ios - Cant get FBGraphUser email -


i use facebook login app. (facebook ios sdk version 3.11.1)

i ask "email" permission:

nsarray *permissions = [nsarray arraywithobjects: @"basic_info", @"email", nil]; 

most of time, user's email that:

nsstring *email = [user objectforkey:@"email"]; //user (nsdictionary<fbgraphuser> *) 

sometimes don't. (i can see nsdictionary not including email).

i using fix app won't terminate when use email later , nil:

nsstring *email = [user objectforkey:@"email"] ? [user objectforkey:@"email"] : @"no_email"; 

but need real mail, have come new solution. haven't noticed special problematic users. ideas can problem?

it appears known problem... many reasons, not on facebook have email address registered.

but said, problem need real mail. simplest solution use user's facebook email : user_name@facebook.com

nsstring *email = [user objectforkey:@"email"] ? [user objectforkey:@"email"] : [nsstring stringwithformat:@"%@@facebook.com", user.username]; 
  • some links ref can't sent html emails facebook mail, plain text!

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -