Difference between FQL Query and Graph API Object Access

What is the difference between accessing user data with the Facebook API ( http://graph.facebook.com/btaylor ) and using the Graph API to execute the FQL query of the same user ( https://api.facebook.com/method /fql.query?query=QUERY ).

Also, does anyone know which one uses the Facebook Developer Toolkit (for ASP.NET)?

The reason why I ask is because I try to access the user registered on my birthday after they start a Facebook Connect session on my site, but when I use the toolkit, it does not return it. However, if I make a manual call to the Graph API for this user object, it will return it. Perhaps I may have something wrong with my call from the toolbox. I think I might need to include a session key, but I'm not sure how to get it. Here is the code I'm using:

_connectSession = new ConnectSession(APPLICATION_KEY, SECRET_KEY); try { if (!_connectSession.IsConnected()) { // Not authenticated, proceed as usual. statusResponse = "Please sign-in with Facebook."; } else { // Authenticated, create API instance _facebookAPI = new Api(_connectSession); // Load user user user = _facebookAPI.Users.GetInfo(); statusResponse = user.ToString(); ViewData["fb_user"] = user; } } catch (Exception ex) { //An error happened, so disconnect session _connectSession.Logout(); statusResponse = "Please sign-in with Facebook."; } 
+4
source share
3 answers

It seems that the reason I could not get the birthday and other information I was looking for was because I did not have a complete list of all the extended permissions that could be requested. Finally, I found the list at http://developers.facebook.com/docs/authentication/permissions (which included user_birthday).

If anyone has information on the FQL vs. question Graph Object, I will still be interested in this. Although I think they are basically the same.

0
source

The Graph and FQL APIs are similar in that they both access the same basic Facebook objects: nodes, collectively called the “social graph." The Graph API is a simple, consistent, and fairly direct way to access these objects. If you know exactly what you were looking for, the Graph API is an easy way to get it.

FQL, on the other hand, is a query language (e.g., SQL). This allows you to search for graph objects that would be impossible (or difficult) to search using the simple direct Graph API.

Another FQL feature associated with the Graph API is the ability to batch enter multiple queries in one call (which can save you a lot of time in the opposite direction for multiprocessor queries).

Ultimately, the Graph API seems to be a more direct idea of ​​what is happening “under the covers” in a social graph, so I find it easier to use when I can. But if my Graph API request becomes very long or incomprehensible (or at any time when I need to make more than one related social graph request), this is a sign that he needs to switch to FQL.

+8
source

It seems that this has changed (and again). Since you are using the facebook connection, you can ask for permission to provide you with the necessary information, for example, a custom birthday, for example:

 <fb:login-button perms="email,user_birthday"></fb:login-button> 

Additional Information:

http://developers.facebook.com/docs/guides/web#login

0
source

Source: https://habr.com/ru/post/1308908/


All Articles