Questions tagged [facebook-graph-api]

Facebook Graph API is a structured API for fetching objects and the connections between them from Facebook's social graph

The Facebook Graph API is provided by the Facebook platform to interact with Facebook's social graph. It's a low-level HTTP-based API that you can use to query data, post new stories, manage ads, upload photos and a variety of other tasks that an app might need to do.

This includes Facebook users, pages, and other objects, as well as the connections between them such as links, photos, or notes.

It provides a structured view of the Facebook "social graph" and represents objects in the graph (e.g. people, photos, events, pages) and the connections between those objects (e.g. likes, uploaded, is tagged in).

Tool Graph API explorer - The easiest way to understand the Graph API is to use it with the Graph API Explorer, a low-level tool you can use to query, add and remove data. It's a very handy resource to have at your fingertips while you integrate with Facebook.

You can ask questions with tag which requires Facebook Graph API calls for above objects only with different SDK's.

Resources

34984 questions
97
votes
8 answers

How to get the Facebook user id using the access token

I have a Facebook desktop application and am using the Graph API. I am able to get the access token, but after that is done - I don't know how to get the user's ID. My flow is like this: I send the user to…
Mohoch
  • 2,633
  • 1
  • 26
  • 26
92
votes
2 answers

IOS Facebook SDK - Post Open Graph and show on Timeline without clicking Activity Log

From the Facebook SDK sample code, when successfully posting the open graph object to the timeline, you have to click Show on Timeline in the Activity Log on the Facebook website. How to ignore these steps and explicitly share your OG to timeline?
91
votes
14 answers

Facebook Graph API, how to get users email?

I'm using the Graph API, but I can't figure out how to get a logged-in users email address. The intro to Graph states "The Graph API can provide access to all of the basic account registration data you would typically request in a sign-up form for…
kylex
  • 14,178
  • 33
  • 114
  • 175
91
votes
20 answers

Facebook Graph API : get larger pictures in one request

I'm currently using the Graph API Explorer to make some tests. That's a good tool. I want to get the user's friend list, with friends' names, ids and pictures. So I type : https://graph.facebook.com/me/friends?fields=id,picture,name But picture is…
Martin
  • 11,881
  • 6
  • 64
  • 110
90
votes
9 answers

Send private messages to friends

I need to get via Facebook connect user's info and send a private message to all of his friends. Is it possible?
89
votes
4 answers

Is there a way to discover all endpoints of a REST API?

I'm wondering if its possible to programmatically discover all the endpoints of a particular API. So for example if I GET this URL with a browser or curl: https://api.twitter.com/1.1/ I might get something like this as a JSON…
4m1r
  • 12,234
  • 9
  • 46
  • 58
88
votes
21 answers

Login Error: There is an error in logging you into this application. Please try again later

I am getting this error. When I try to sign in with facebook to my app. When I first time authentication it will correctly working. After I unistalled my application and now trying to sign in with Facebook on that I am getting this error. Another…
Naveen Kumar M
  • 7,497
  • 7
  • 60
  • 74
88
votes
10 answers

Facebook: get list of pages that a user is admin of

I'm using the graph api. I have a logged in user, and want to get back a list of page ids of all the pages that the user is an admin of. Is there a way of doing this? The docs are pretty bad - and circular.
EoghanM
  • 25,161
  • 23
  • 90
  • 123
87
votes
8 answers

Facebook 'Friends.getAppUsers' using Graph API

I have an application that uses the old REST API call Friends.getAppUsers to get the list of friends for the current user that have authorized my application. I have read the documentation, how do I do this with the Graph API? What would an example…
Richard
  • 28,691
  • 8
  • 33
  • 34
87
votes
3 answers

When do I need a fb:app_id or fb:admins?

The doc for the facebook like button says , "When your Web page represents a real-world entity, things like movies, sports teams, celebrities, and restaurants, use the Open Graph protocol to specify information about the entity." I'm adding like…
J Set
  • 1,191
  • 1
  • 7
  • 14
80
votes
5 answers

What's the Facebook's Graph API call limit?

Is there any restriction in number of calls we make to facebook's graph api? and If it is there then how many calls can we make per app daily?
Mehul Hingu
  • 1,240
  • 1
  • 9
  • 12
80
votes
9 answers

How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?

The title says it all. I'm using a custom button to fetch the user's facebook information (for "sign up" purposes). Yet, I don't want the app to remember the last registered user, neither the currently logged in person via the Facebook native app. I…
79
votes
2 answers

"Uncaught (in promise) undefined" error when using with=location in Facebook Graph API query

I am currently developing a web application with the Facebook Graph API. My current goal is to retrieve only posts which have a location attached. While retrieving posts with and without location is already working, I am not able to retrieve only…
76
votes
10 answers

Is there a way to check if Facebook access token is still valid?

My site utilizes lifetime access tokens (offline_access). However, if the user changes his/her password, the access token gets reset. Is there a method to check if the current access token is valid before making calls to the Graph API? Thanks for…
axsuul
  • 7,370
  • 9
  • 54
  • 71
76
votes
3 answers

The app references non-public selectors in Payload/.app/: decoder

I am getting this warning while submitting app to the Apps store through organizer. The app references non-public selectors in Payload/.app/: decoder i know we get this warning if we use any Third Party API in our application. I have used…
Akshay Aher
  • 2,525
  • 2
  • 18
  • 33