问题
Here i am trying to add a post to facebook using following code.
FBAppCall *appCall = [FBDialogs presentShareDialogWithLink:urlToShare
name:@"Title"
caption:nil
description:@"description"
picture:nil
clientState:nil
handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
if (error) {
NSLog(@"Error: %@", error.description);
} else {
NSLog(@"Success!");
}
}];
But this isn't working. It give following error.
Error Domain=com.facebook.Facebook.platform Code=102 "The operation couldn’t be completed. (com.facebook.Facebook.platform error 102.)" UserInfo=0x1cde3340 {error_code=102, action_id=E780C3AA-1387-4B9C-9A3A-9A16FB54BC59, error_message=An error occurred during publishing., app_id=558567750859724}
Here i am working on cocos2d
, is this can be the reason.
回答1:
Go to your app's settings under the Facebook developer portal.
Go to open graph > types
Choose the action type using and turn on "User Generated Images" for that action type. Save these settings and try again. It will work.
回答2:
I encountered this error as well, make sure you disable the sandbox mode in Facebook admin panel before distributing to any other user :P
回答3:
I recently encountered this error when the link I tried to post did not load correctly (was loading a 404 page). Not sure why, but maybe Facebook requires the link work.. Either way they need to make their error messaging more specific.
来源:https://stackoverflow.com/questions/17667864/facebook-posting-error-in-ios