Threads about FB -object, JavaScript SDK, OAauth 2.0 and Graph API?

邮差的信 提交于 2019-12-08 12:35:03

问题


I cannot understand the FB API. I feel the problem is because I cannot understand the protocals OAouth draft page (source, page 19). Well firstly it was so but now I understand that OAouth 1.0 and OAuth 2.0 are totally different protocols although for the same goal, apparently..

Perhaps the most essential stuff are FB docs about authentication here and a blog post here. I am trying to categorize here threads to dig deeper into the FB API.


回答1:


I cannot find things such as picture or friends in the Graph API -object

That’s because you didn’t ask for them …

To get a user’s friends, you have to query the /userid/friends connection.

And for the user’s picture, you can just use the address https://graph.facebook.com/userid/picture as the image src – this will redirect to the actual picture.

It’s all described here: https://developers.facebook.com/docs/reference/api/user/ under „Connections”




回答2:


I am trying to organize here things.

Trials and some Confusing Points with Questions

Some code here and in history. Logs in history.

  1. [solved] Trial 1 shows a cover picture from FB but not using FB API. FB -object does not store the picture URL! You need to use the POST -url.

  2. [solved] Trial 2 with /userId does not request friends (thanks to one answer) but now a new problem with authorization, solved by this answer here.

  3. [solved] Trial 3 with /userID/friends does not work due to no access-token. Solution here.

  4. [solved] how do the many inner-most FB.login here to get the access token? Moved this q here.

  5. [solved] what does the __PROTO__ mean? -Unreliable, you are not going to use it (according to the chat -msg in history).

THIRD-PARTY MATERIAL

Manuals

  1. Graph API here

  2. JS SDK here

  3. The OAuth draft paper about the webserver flow here.

  4. FB.login here

Perhaps related

  1. [URL -method] facebook graph api picture

  2. [URL -method] facebook graph api photos retrieve

  3. [URL -method] facebook graph api retrieve wall photos

  4. [PHP] How to use Facebook graph API to retrieve fan photos uploaded to wall of fan page?

  5. [PHP] Pulling in photos via Facebook Graph API

  6. [Unsolved] https://stackoverflow.com/questions/7819091/can-i-retrieve-facebook-photos-through-graph-api-that-are-only-shared-with-frien



来源:https://stackoverflow.com/questions/10905476/threads-about-fb-object-javascript-sdk-oaauth-2-0-and-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!