I integrated Facebook SDK into my iOS native APP. I completed login and received active FBSession. Then I ask for publish permission and then I want publish a new ost on my wall or on friend wall. I don't understand how to do it, can you help me please?
NSMutableDictionary<FBOpenGraphObject> *object = [FBGraphObject openGraphObjectForPost];
object.provisionedForPost = YES;
object[@"title"] = @"This is Test!";
object[@"image"] = @"http://www.test.com/myimage.png";
[FBRequestConnection startForPostOpenGraphObject:object
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if(error) {
NSLog(@"Error: %@", error);
} else {
NSLog(@"Success %@", result);
}
}];
I receive this error:
2013-09-07 12:50:36.078 LSFacebook[1177:c07] Error: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xa24e730 {com.facebook.sdk:HTTPStatusCode=500, com.facebook.sdk:ParsedJSONResponseKey={ body = { error = { code = 1; message = "An unknown error has occurred."; type = OAuthException; }; }; code = 500; }, com.facebook.sdk:ErrorSessionKey=, expirationDate: 2013-11-06 10:29:13 +0000, refreshDate: 2013-09-07 10:50:25 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:( installed, "basic_info", email, "publish_actions" )>}
Thanks
Luca