Alex Kombo
Alex Kombo

Reputation: 3356

Getting phone number from Facebook AccountKit when using AccountKitActivity.ResponseType.CODE

The Facebook AccountKit documentation states that if your began the login session with AccountKitActivity.ResponseType.TOKEN, it's possible to access the Account Kit ID, phone number and email of the current account via a call to getCurrentAccount().

Is it possible to access the phone number using the method getCurrentAccount() if you begin the login session using AccountKitActivity.ResponseType.CODE?

Upvotes: 1

Views: 924

Answers (1)

Olga Kuznetsova
Olga Kuznetsova

Reputation: 361

If you use the ResponseType as CODE the access token and phone number will not be passed back to the client SDK. You'll be able to get the phone number on your server.

See an illustration here: https://fb-s-d-a.akamaihd.net/h-ak-xpa1/t39.2365-6/12057091_480836178775274_72687398_n.jpeg

See instructions here: https://developers.facebook.com/docs/accountkit/graphapi

Upvotes: 0

Related Questions