I am trying to build a Chrome extension and I want to get all the posts that people posted on the user's wall specifically on his birthday.
I tried to call through Facebook Javascript SDK, but it is not returning the posts that are posted by my friends on the birthday.
FB.api(
'/me/feed',
'GET',
{},
function(response) {
// Insert your code here
}
);
Rather, it is returning all the birthday posts in one post like this:
{
"message": "Belated happy birthday bhaiii.....",
"created_time": "2015-10-19T00:02:02+0000",
"id": "578828115566706_848912165224965"
},
{
"story": "Ritwik Jain and 40 others wrote on your Timeline.",
"created_time": "2015-10-18T03:59:39+0000",
"id": "578828115566706_848604468589068"
},
How do I get each post individually?
Thanks in advance.
As you found out, the
/me/feed
endpoint is what you need to use - with theuser_posts
permission, of course. Facebook puts birthday posts together as it seems, but there is no other way to get the posts. Meaning, there is no way to get the birthday posts separately.Endpoints for the user wall: https://developers.facebook.com/docs/graph-api/reference/v2.5/user/feed