I use the Facebook iOS SDK and Parse to handle user login via Facebook in one of my applications. However, after creating the application with the iOS 9 SDK, the application did not seem to be able to retrieve information from the Facebook chart APIs.
Here are the code snippets that I used to output information from Facebook
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]initWithGraphPath:@"me" parameters:@{@"fields":@"name,email,id,gender"} HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error){
NSLog(@"%@",result);
}];
After setting the breakpoint, I found that the block completionHandlerwas not called at all, that is, there were no results and errors from the call ...
I changed the file info.plistbased on the instructions for iOS 9 on the Facebook website . And the application uses a Facebook account, and it worked great for logging in.
When a user logs in, the permission that I used for the application is @[@"public_profile",@"email",@"user_friends"].
Any suggestions are welcome!
source
share