Facebook graph api response taking time - facebook-graph-api

My app is using the Facebook Graph API to retrieve the complete list of a Facebook user's friends:
GET https://graph.facebook.com/USER_ID/friends?limit=5000&access_token=ACCESS_TOKEN
Results are taking a long time to show up. What could be the error? Is there an alternate way to fetch the results at a faster pace?
thanks.

Related

Posting event to facebook using the graph api

I am trying to build an application where admin users would trough a form insert "events" containing title, description, starttime/endtime and some other fields. At the moment theese users are primarily using facebook to reach out to their users, they would like to be able to move to my app aswell as stay on facebook without too much hassle. I solved the issue of getting the events of facebook by having them all sign up for the graph api with their community/company pages and giving me the access token to fetch data about their events trough a get request to.
https://graph.facebook.com/v15.0/me/events?access_token={their token}
Now my next task at hand was simple i tought simply make a post request to the same api endpoint, but i quickly realized i was not able to do this and well i do not know how to proceed to be fair.
Tried to make a post to the same endpoint but got errors and after searching the documentation found that this was not supported??

Facebook Graph API get likes/reactions

I'm trying to fetch some data from page posts on Facebook with the Graph API. I'm using Python normally but I try the queries first with the Exploration tool offered by Facebook.
I used the page_id + post_id to get the number of reactions (I would also like to get the count for each different reaction) and likes. But it just returns nothing. I get the data for the shares though. I have the post open on another tab and it has likes and reactions.
Don't know what I'm doing wrong.

How to get Facebook page posts count on Android using Facebook SDK

I am building an app, which lists all posts from a Page(that I manage and post to) and also gets corresponding posts view count. I looked into the documentation and it seems like the page needs a minimum of 30 Likes for insights API to work. Is this correct? Is there a way I can get the view count?
Here is the output from Graph Explorer. I have set the access token to Page Access token.
I am passing the Post_ID to HTTP GET. I can see directly from Facebook that the post has reached N number of people. But the returned data from the API call is empty. Any help?

Get all Facebook friends in one Request

I would like to retrieve all of a user's facebook friends with the installed field for my app. With facebook's graph api, it paginates the response, but I don't want to have to make multiple requests per user. Is there a way to do https://graph.facebook.com/<user_id>/friends?fields=installed&access_token=<access_token> to get all friends and not paginated?
If you are wondering, I am using this data to reconstruct a friend graph for my application.
You can add limit to the call to increase the number of results you get. E.g.:
https://graph.facebook.com/<user_id>/friends?fields=installed&access_token=<access_token>&limit=1000

reading and paging through the user's stream (home) using the graph api

I am trying to read a user's stream using the facebook graph api. the call is:
https://graph.facebook.com/me/home?access_token=xxxxx&since=yyyyy
I am getting a response but there are a few problems:
The result I get as a response is not identical to the stream I see as a facebbok user (many posts are missing - on facebook page, in the news feed, i can see much more posts than i get back in the response)
It seems that even if I use the "since" parameter, many of the posts returned are out of the time scope. Any ideas why? I would like to do paging according to specific time periods but it seems facebook api is not working as expected (it will return results earlier than the "since" parameter and it will not return all the posts i can see in my news feed).
thanks
It's easy to get these two connections from the user graph API object confused.
me/home is for the user's news feed
me/feed is for the user's wall
I would suggest using FQL via the Graph API and poll the stream table directly:
fql?q=SELECT post_id, comments, message FROM stream where source_id=me()
I'm pretty sure there's a bug logged at developers.facebook.com/bugs for the since parameter not working as expected.