Facebook Graph API - authorization types?

后端 未结 5 1348
南旧
南旧 2021-02-10 22:34

I\'m struggling with the new Facebook Graph API, perhaps someone here can help.

Here is what I want to do: provide a ‘login w/ FB’ button, throw to /authorize, get a cod

5条回答
  •  天涯浪人
    2021-02-10 23:07

    This answer should clarify nategood's last comment

    nevermind. figured out my problem. make 100% sure that redirect_uri is identical when making authroize and access_token call! – nategood Mar 24 at 0:54

    I struggled with this issue for a long time. Facebooks documentation is poor, and answers on these sites seem to fall in to one of two categories: use type=client_cred or don't use type.

    Don't use "type=client_cred". Follow the facebook documentation and just make sure that the redirect_uri you use in your code request to:
    http://www.facebook.com/dialog/oauth/?

    is the same as the redirect_uri you use in your access_token request to: *https://graph.facebook.com/oauth/access_token?*

提交回复
热议问题