Al Jawi
Al Jawi

Reputation: 41

Facebook JS SDK - email response undefined

i have a problem with facebook js sdk response;

i trying to make login with facebook. i use facebook js sdk.

this my code :

Please go here

and i get response just "id" and "name". anyone can help, thanks in advance.

Upvotes: 0

Views: 617

Answers (2)

Hupfauer
Hupfauer

Reputation: 591

You have to specify the fields you wish in return. But you query against API 2.0 i would suggest to update to v2.5!

Here you go:

v2.5/me?fields=name,link,id,email

Upvotes: 2

Al Jawi
Al Jawi

Reputation: 41

I already found the answer, seems that I forget to write the query string following '/me':

FB.api('/me?fields=name,email', function(response)

and

{scope: "public_profile email"}

Upvotes: 1

Related Questions