Is it possible to specify a time span for the posts returned by GET /v2.x/{page-id}/feed?
For example, I want all the posts of the last hour and only those...
EDIT: Just found the since and until fields for the feed. However, this only seems to apply to posts, not to comments on those posts...
Any way to apply the time span to both posts and comments, regardless?
Ideally, I would get a chronological list of messages (whether posts or comments) for the last X time units.
Graph API returns comments in same order as selected on actual post|picture|etc..
I already searched alot about this. Then i went for a stupid but simple solution. I can show you if you are willing to made 2 requests to graph api to get comments
Related
Is there a simple way to get the number of likes on posts on a page from the facebook graph API. My current Aproach is to get the feeds of the page, and then for each individual post get the ammount of likes.
So First I itterate all the posts on
--This make this a ton of times as I can only retrive 100 at a time
/{page-id}/feed
And then using each post ID
--Make this request even more times
/{object-id}/likes?summary=true
But this is horribly inneficient and takes a lot for each page.
So basically the question is, can I get the info making less requests?
This works for me:
/{page-id}/posts?fields=message,likes.limit(1).summary(true)
I'm trying to figure out a way to calculate a Facebook page's average number of posts per day using the API. The problem is that the API does not show when the page was created. Instead, I'm downloading all the posts and using the oldest post as some sort of creation date (which is not 100 percent correct...).
The problem is when a page adds backdated posts. For instance, someone might post a picture in 2012 that's dated 2008. Then that post will be oldest, even if the page hasn't existed that long.
One solution is to go by the updated_time field instead of created_time, but it's not a great solution that still may not be correct.
Is there someway to get around this?
Sorry if this question has come up before, but I couldn't find anything on it.
Unfortunately what you're looking for isn't possible using the API.
For a given post two dates are returned - created_time and updated_time.
As you rightly pointed out the created_time can be updated to add a post in the past.
updated_time also will not work for you as this gets updated whenever someone comments on a post.
https://developers.facebook.com/docs/graph-api/reference/v2.3/post
I'm trying to analize a large number of posts from varoius pages for my bachelor thesis. Therefore I'm using a tool called Facepager which uses the graph API to fetch data from Facebook.
I need the following data:
id, link, type, from and the count of likes, shares and comments (just the numbers, no further info!). In general, everything is working just fine, only posts classified type=status behave strangely. For some of these posts, there is no data shown about like, share and comment counts, further more there is no link given. But as mentioned before, this only happens sometimes! I searched for the affected posts manually on facebook and some of them had a large number of likes, shares or comments.
I also tried to fetch data with graph API explorer with similar results.
Is there any reason why it isn't possible to get share, like and comment count on some of the posts classified type=status?
Additionally, I'm planning to use the ID or if invalid, the link to open specific posts in my browser. This is not possible for some of the status posts either.
Sorry for that newbie question, it would be amazing if I could get an answer because at the moment I am quite desperate because this is really important for my bachelor thesis. Thanks a lot!
Because this kind of post is a post which "CAN NOT BE VIEWED".
ex: "xxxx likes a link", or "XXX commented on a post".
I suggest that you should filter out these posts by yourself.
I'm trying to get the recent wall entries for my wall, so the url for this is dead simple:
https://graph.facebook.com/me/feed?limit=30&date_format=U&since=1308733229&access_token=<token>
Now, i'm just putting current time in place of since= and getting recent entries
But, the problem is, if something gets updated (someone comments my wall entry) it won't show up as something new
Is there any proper way to get new/recent comments OR to get updated wall entries? (fql may work too)
You can use FQL to get a little more control over what you are returning from your feed, check out https://developers.facebook.com/docs/reference/fql/stream/
How do you define new? As in content since the last time you polled the API? You could do this on your end by getting the difference between what you already have and the result of your latest poll.
Or if you would prefer pushed updates that only include the differences since your last update you can subscribe to the realtime updates API: https://developers.facebook.com/docs/reference/api/realtime/
I would think there would be a cut-off on the number of posts, or a cut-off in time period after which I won't be able to get the posts. From a few test runs, I am unable to form any idea as for some pages it returns all the posts till the beginning whereas for some it stops midway. Also neither is the number of posts hinting towards a constant limit, nor is the first post time hinting at any time cut-off.
The documentation(http://developers.facebook.com/d...) doesn't talk about any limit, so I am out of ideas. Can anyone throw some light on this and provide some credible information? Thanks already for your time.
The documentation https://developers.facebook.com/docs/reference/api/user/ was updated to show you get up to 25 posts.