I was data mining with facebook search api https://graph.facebook.com/search
But theese operators OR | , AND +, "lorem ipsum" does not work anymore.
Is there any way to make it work or a way around ?
Related
I was able to construct a detailed spreadsheet from iso.org, by going through 10 different web pages, copying and pasting.
What I would like to do, is keep this list updated, and add/de-activate as countries appear, disappear or split.
I did a search, but could not find an API to retrieve the ISO codes (long name, 2-code, 3-code, numeric). Anyone aware of such an API?
Currently our registration form tracks UTM and SEM codes, plus you get very long string with Social sign ins. I end up with roughly 4k enrollment variations, very hard to track outside of goals.
In order to better trouble shoot channels, I've created a separate view where I want to combine everything into just /enrollment while excluding thank you page. So i would have a list like this:
www.mysite/enrollment
www.mysite/enrollment/
www.mysite/enrollment/sem01
www.mysite/enrollment/sem02
www.mysite/enrollment?adsforefacebook
www.mysite/enrollment?utmforemail
www.mysite/enrollment/thank-you
I've tried using this filter which works in the goal section, but I can't get it to work under filters.
Find
www\.mysite\.com\/enrollment(?!/thank\-you)
Replace
www.mysite.com/enrollment
Theoretically, this should catch everything with enrollment except thank you pages and replace with the new string.
I've tried several variations that include .*, but no go.
Oops. Nevermind, I think I figured it out right after I posted this. I don't think the normal find and replace works with exclusion patters and you have to use the Advanced filter... which worked exactly as expected with the above code.
I am trying to figure out the right parameters for ItemSearch such that the API call will return the same result as on the website. Currently I am using these params it is not consistent with the website.
url_params = dict(
Service='AWSECommerceService',
Operation='ItemSearch',
AssociateTag=AMAZON_ASSOCIATETAG,
SearchIndex='All',
AWSAccessKeyId=AWS_ACCESS_KEY_ID,
Keywords=keywords,
ResponseGroup='Small,OfferSummary,Images'
)
For example if 'iphone%205s' is put in keywords, the API returns a list of iPhone protectors, while searching on the website gives iPhones as top results.
I am also trying to figure out why this is for book searches. One possible answer I found online was that the websites search feature might use more elaborate queries than just one simple API call. For example, it may take into account other factors into the search (not sure what that might be but it may).
I have a couple of questions regarding the Graph Api > Search Posts functionality (http://developers.facebook.com/docs/reference/api/search/):
What operators does the QUERY paramater accept? Usually search engines accept AND, OR, exact match ("red apples") and NOT/exclusion. I'm confused about how these operators function for Facebook.
What exactly does it search through? Sometimes I see results that don't match the search query at all. Does it search through the posts's message, or through comments from posts as well?
The query parameter only accepts strings and not operators. You should specify a type too so you can filter between users, posts, etc. Depends in what you want to search for, you will need a valid user access_token.
If you are searching for posts, it will only search within the post itself, and not the comments.
I am using RestFB to search multiple terms on Facebook. I am using following code to achieve that.
Connection<Post> publicSearch = publicOnlyFacebookClient
.fetchConnection(
"search",
Post.class,
Parameter.with("since",
DateFormatter.stringToDate("2013-01-01")),
Parameter.with("q", "apple OR oranges"),
Parameter.with("type", "post"));
I have two questions.
Is this the correct way of using OR
I observed, even when I have mentioned "since" I get results in decreasing order in timestamp. The results start from NOW and go backwords. Is there a method to start getting methods in forward manner (something like twitter streaming API)?
You can use the | character for OR (e.g apple | oranges)
Graph API always returns the latest results first, there are no parameters to control that. To work around this you could implement a Comparator that compares the Post class by time and sort the result List using Collections.html#sort(java.util.List, java.util.Comparator)