I use facebook sdk on my iOS app to sign-in and sharing story.
Sharing story on Facebook feature was working properly but today it's not working. I don't know why it's not working because no code changes related to that feature.
The followings are the code that requests publish_actions permission.
// Request publish_actions
[FBSession.activeSession requestNewPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
// Permission not granted, tell the user we will not publish
} else {
// Permission granted
}
} else {
NSLog(@"DEBUG: error = %@", error);
// There was an error, handle it
// See https://developers.facebook.com/docs/ios/errors/
}
}];
The error message is as followings,
Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. com.facebook.sdk:ErrorReauthorizeFailedReasonSessionClosed"
UserInfo=0xXXXXXXXXX {
com.facebook.sdk:ErrorLoginFailedReason=
com.facebook.sdk:ErrorReauthorizeFailedReasonSessionClosed,
NSLocalizedFailureReason=
com.facebook.sdk:ErrorReauthorizeFailedReasonSessionClosed,
com.facebook.sdk:ErrorSessionKey= ... >
}
If anybody knows this, please help me.
** Facebook SDK version is 3.18, and publish_actions item is already approved in developer.facebook.com