Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook posting error in ios

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.

like image 564
Hasintha Janka Avatar asked Jun 13 '26 10:06

Hasintha Janka


2 Answers

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.

like image 105
SarpErdag Avatar answered Jun 16 '26 11:06

SarpErdag


I encountered this error as well, make sure you disable the sandbox mode in Facebook admin panel before distributing to any other user :P

like image 24
EES Avatar answered Jun 16 '26 11:06

EES