0
votes

I'm using facebook graph api V2.0 to authenticate users in my app which is in development right now. The permissions requested is as follow: "public_profile", "user_friends", "email" The app needs birthday and email of the user. When the developer user logs in, the call to facebook graph api returns all data needed, but when the tester user logs in email, birthday and other data is not returned. Both users (developer and tester) gave all permissions requested at login. Anyone with this odd behavior out there? Thanks

Update: Request Permission: @"public_profile", @"email", @"user_birthday", @"user_friends"

Now the api is returning birthday but not email. Just checked the access token and got all the permissions needed. The app is calling:

[FBRequestConnection startForMeWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
 ---- code here ---
}];
1
You don’t get the birthday without asking for the corresponding permission first … - CBroe
Check that the access token that you are using have the permission. If it does you have to tell us what you request you are making with that accesstoken - WizKid
Just updated the question with more info. - Williams_Martinez

1 Answers

1
votes

First, for both users, call /me/permissions and ensure all the permissions you expect are listed.

Secondly, not all users have email addresses. In some cases the user may have signed up for Facebook via mobile and thus not entered an email, or not validated the email address.

You should code defensively, occasionally expecting that these fields may be null.