Facebook graph api (i) Only able to get public fields (ii) how to get email?
I know this is repetative quetion in stackoverflow, but I have checked and tried all of them. I am using CodeIgniter and Facebook connect.
I开发者_C百科 am using this facebook_connect library integrated in CodeIgniter : http://www.haughin.com/code/facebook/.
I am able to connect and get information from facebook. But I have some doubts.
(i) I am able to get username, link, picture. But can not get hometown, city until I change its permission to public (in facebook). Is it normally how it works?
(ii) Same way, for getting email, do I need to do any privacy changes in my facebook account?
Thanks.
You need to request the user_hometown
and email
permissions.
Have a read of this: https://developers.facebook.com/docs/reference/api/permissions/
Without any special permission you can access fields which are set as public, otherwise you need the user to authorise specifically each type of content you want to access
For example you need the email
permission to access the user's email address
精彩评论