Getting phone number from Facebook Account Kit

前端 未结 4 1176
暗喜
暗喜 2021-02-06 07:25

The Account Kit documentation states that if your began the login session with AccountKitActivity.ResponseType.TOKEN, it\'s possible to access the Account Kit ID, phone number a

4条回答
  •  自闭症患者
    2021-02-06 07:36

    The purpose of using CODE instead of TOKEN is to shift the token request to your application server. The server uses the Graph api to submit the auth token and if the auth token is valid, the call returns the access token which is then used to verify the user's identity for subsequent API calls.

    A graph call to validate the access token returns the account kit id plus additional metadata like the associated phone number and/or email.

    {  
       "id":"12345",
       "phone":{  
          "number":"+15551234567"
          "country_prefix": "1",
          "national_number": "5551234567"
       }
    }
    

提交回复
热议问题