Limit of entries in Graph API 'home' results - facebook-graph-api

I want to get stream entries from the last x days or weeks in the past. But when I call the news feed via Graph API with parameter 'limit' or 'until', I get entries from the last 48 hours only, no matter how high I define the parameter, also paging to the next pages is not possible, they are empty.
https://graph.facebook.com/me/home?access_token=...&limit=500
It seems that Facebook set up a limit (only in the 'home' feed). Does anybody know if there is a possibility to get more entries from a larger period of time? Or is it possible to get whitelisted from Facebook to receive more entries?

It seems /user/home has been deprecated use /user/feed instead
in response to your question the following are available in the graph explorer but i havent been able to find documentation on these. I would do more research on these.
/user/feed/?since=<value>
/user/feed/?until=<value>

Related

Facebook graph api started to return only the first 10 posts in a group feed

a few days ago I started to experience troubles accessing facebook group data feed using graph api (i am using v2.8 but the results are the same also with older versions).
The graph api call started to return only the first 10 posts in the feed (i.e. the most recent ones) even though no changes were made from my side.
The same behaviour is reproducible also in graph api explorer using /groupId/feed path (I am not passing the 'limit' parameter in the request url). Previously it has been returning all the available posts with paging, etc.
Please note that if I use a pageId instead of groupId all the posts in the specified page are returned correctly - seems only groups are affected.
Can somebody shed some light on this?
Regards
Due to this thread in Facebook Developer Community it looks like a bug.
Here are bug reports:
https://developers.facebook.com/bugs/1316646108368355?hc_location=ufi
https://developers.facebook.com/bugs/1796973007211974?hc_location=ufi
https://developers.facebook.com/bugs/1645827285730392?hc_location=ufi

how to get likes counts from a Facebook page using Graph Explorer 2.4

While this question has been asked a lot, I've still haven't find a way to do it.
I'm passing this to Graph Api Explorer
40796308305/?fields=feed{full_picture,created_time,message,likes}
this gives me the, Picture to every status, created time , message - user status and likes which gives me array of data and users that likes the status.
i'm trying to get count of those users and remember there were a field 'summary' but I don't see it in the JSON Results.
Am I missing something with 2.4 api version ?
any help will be appreciate.
You need to request the summary:
/40796308305/?fields=feed{full_picture,created_time,message,likes.summary(1)}
And if you are only interested in the total count, but not the individual users that liked, you might want to set the limit for likes to 0, so as not to request unnecessary data:
/40796308305/?fields=feed{full_picture,created_time,message,likes.limit(0).summary(1)}

How to get similar items with Amazon's Product Advertising API?

I have recently added an Amazon Search to my website and am having an issue getting the full response I need. In around 10% of my calls I get zero hits even though Amazon's site itself display numerous hits. Here is my call to their service:
results = Amazon::Ecs.item_search(query_text, {
:search_index => 'All',
:response_group => 'ItemAttributes, Images, Offers',
:item_page=>’1'
})
90% of the time the results I get back are just fine, but with any of the following query texts this search returns 0 hits:
hoover bag 440004496 type S
Citizen Women’s Stainless Steel Bracelet Watch 18mm EJ5850-57E
mope space pack iPhone 5
Yet when I go to Amazon.com directly and search on any of these targets I do get plenty of relevant responses.
What happens is Amazon displays, for instance, "Your search "hoover bag 440004496 type S" did not match any products" and then goes on to display "hoover bag 440004496 type S” See all 322 results…” and plenty of good, relevant product matches that I would love to display on my page.
You can see the results (or lack thereof) at my site, www.FastForward.menu
How do I get these helpful responses through the API? Preferably in the same format that any populated initial item_search response is in? Preferably in the same call as the initial response so I don’t have to write more parsing code?
There is a “Similar products” API call, but to do that you need at least one product to pass in, which I do not have. See here: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/SimilarityLookup.html
How do I get this list of “similar” products through the API so that my Amazon searched don’t come up completely empty around 10% of the time?
I am sure others have run into this same question.
Please feel free to ask questions or to make suggestions as to how I can improve this question.

Getting the facebook graph to only return results with a # symbol in it

Any one have any ideas on how to accomplish this?
I have tried
https://graph.facebook.com/search?q=%22%23apple%22
https://graph.facebook.com/search?q=%23apple
https://graph.facebook.com/search?q#apple
which does not work.
To be clear the results should only have posts that contain #apple not "apple".
Facebook says this is not supported at this time: https://developers.facebook.com/x/bugs/313941462054417/
if you're trying to get the #hashtags from Facebook, currently, there is no api for this. and even if there were- the posts are not intermediate, they are being cached. you won't see the most recent hashtag from a person who's not in your friendlist right away, this will take a long time to appear in the hashtag search
I've read too that it's not supported but,
trying the second line of jlarry
https://graph.facebook.com/search?q=%23apple
in Graph API Explorer, it works.
obviously the query is on the posts set as public.
so the query could be something like this
https://graph.facebook.com/search?q=%23joviberton‬&type=post
for further ops check https://developers.facebook.com/docs/graph-api/using-graph-api/

Graph API: Number of Comments for Posts Are Inconsistent Among Various API Calls

Hello Graph API experts,
When you call /[post_id , the result contains "comments" field which has "count" field that is supposed to have the total number of comments for this particular post.
Now, if you call /[post_id]/comments , you get the actual comment data, one by one.
The problem I am facing is that, when I compare the "comments.count" field's value and the number of all of the actual comment data returned, they are different.
What's even worse, if you then look at the same post on Facebook.com's Timeline where you can see the number of comments for that post (i.e. "view all * comments" link), this number is also different from the "comments.count" field value.
And this is not only happening to one post, but to many of them - I observe this tend to happen more to posts with more than 100 comments (I actually counted all the comments on Timeline, and it matched the number of the actual comment data returned from /[post_id]/comments API call).
Is this a normal API behaviour? Which number should I or would you trust if this is the way it is?
ok, when you looking some facebook comment counts on some timeline posts, you woulld see that count for ex. 16 comments, and when you try to count comments manually on the post you may see it's looking 15 comments, so where is it that missing comments ? is that a wrong count by facebook ? no not actually, it's because, some people changing profile privacies as like don't show my comments people who aren't my friends, or we haven't any mutual friends, etc. it's because you cannot get these privatized comments from graph api, but these comments aren't excluding in total count. So what's the solution, just be sure get all the data correctly what facebook provide you. And compare it, how many comments looking like missing, and show missing counts as private comments count in your application. I think is much better.
Welcome to the world of Facebook API programming. Yes, this is normal (but apparently not desired) API behavior. This is one of the inconsistencies we're faced with when programming around their API. CBroe is probably correct in his comment above, it is data inconsistencies between servers in their API cluster.
in addition to this there are problems with pagination, you can use the offset + limit parameters to say how much data you want and from where to take it, if you deal with number of posts, you can say offset=0 and limit=50 and it'll work, but then if you try offset=100 and limit=50 it might return empty data, but then try offset=100 and limit=100 and it'll return 100 posts.
the api is just buggy and full of inconsistencies which don't seem to have any way to solve them.
I think we got oversold on the opengraph, I don't think it's what facebook told us it would be and I'm starting to feel the burn from selling that to my boss and finding out that I perhaps can't deliver :(