When authenticating with following authorization method i’m getting com.facebook.sdk error 5 with startWithGraphPath and startForMeWithCompletionHandler but not with requestWithGraphPath. I’m succesfully getting token (printing in didLogin) and getting anything which i want with requestwithGraphPath but i’m unable to get work with other methods. If anybody encountered with same issue or something similar or has any idea, i’d be happy if you share it.
Thanks
Method:
NSArray *permissions = [[NSArray alloc] initWithObjects: @"user_likes",@"offline_access",@"read_stream",@"publish_stream",nil];
[_facebook authorize:permissions];
Following solution worked for me. But if you’re storing a permanent access token, you need to be sure user not removed application permissions otherwise it will give an error. And you can check that with requestWithGraphPath -> “me/permissions”.
Application Init Function (e.g.:didFinishLaunchingWithOptions/or where you init your Facebook object which needs to be fbsessiondelegate in the mean time)
FBDidLogin function:
Example graph api request function: