Can you help with some stuck here, let’s look on code first,
here i ask for permissions
NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithCapacity:0];
[params setObject:facebook._appId forKey:@"client_id"];
[params setObject:@"token" forKey:@"response_type"];
[params setObject:[NSString stringWithCString:"email,user_about_me,read_stream,publish_stream,offline_access" encoding:NSUTF8StringEncoding] forKey:@"scope"];
[facebook dialog:@"oauth" andParams:params andDelegate:self];
[params release];
Here use @”me” for graph API
- (void)fbDidLogin
{
[facebook requestWithGraphPath:@"me" andDelegate:self];
}
But all what i get is
- (void)request:(FBRequest *)request didLoad:(id)result
{
[UIApplication sharedApplication].networkActivityIndicatorVisible=NO;
NSLog(@"FB result %@", result);
}
FB result (
“Justfortest Workingin”,
100002369945695
)
But how to get email address ?
The correct answer was that fb not return email and other data with
only id and name.
I need to simply put in
another call for user data.
Finally needed method looks like this:
And i got all user data, thx to all for help, hope this will be helpful for someone.
Also thx to guys from http://midatlanticconsulting.com who help me with this problem.