Retrieve email using Graph API

后端 未结 2 1973
面向向阳花
面向向阳花 2021-01-15 01:18

I am using app login access token retrieved through following API -

https://graph.facebook.com/oauth/access_token?client_id=&client_secret=&grant_type=client

相关标签:
2条回答
  • 2021-01-15 01:44

    Two ways to get users primary email:

    1. For the authenticating user (ie the one who has granted your application access to their profile) and only when you explicitly request that permission.
    2. If the email is explicitly made public by some arbitrary user not authenticating with your app, then that will be available to you also. Any publically visable info you can see via facebook.com is equally accessible via the API.

    For getting the authenticating users email, when you first request the oAuth dialog you need to pass a scope with the email permission (as well as whatever other permissions you require). See more about permissions here and more about using scope here .

    When the email is available it can be found in the User payload, see more about the API request and payload here.

    0 讨论(0)
  • 2021-01-15 01:50

    Check the doc here : http://developers.facebook.com/docs/reference/api/user/

    With the email argument, you will be able to get the email.

    0 讨论(0)
提交回复
热议问题