0

On the following code, when I try to share OG story via Share Dialog, and when I get to the share dialog, the "Post" button isn't enabled (even after I enter text).
I had "something went wrong..." in the FB app, but now I don't have it at all

The rest of the post seems OK.
Another important thing: Almost a similar variant of this code, but with user generated photo works perfectly, but here the photo is a URL and is not user_generated

The code:

NSString *FacebookAppNamespace = @"my_fb_namespace";

id<FBGraphObject> object = [FBGraphObject openGraphObjectForPost];
FBOpenGraphActionParams  *params = [[FBOpenGraphActionParams  alloc] init];
id<FBOpenGraphAction> action = (id<FBOpenGraphAction>)[FBGraphObject graphObject];
NSString *previewPropertyName;
        url = [NSString stringWithFormat:@"%@/facebook.html?al_applink_data=type%%3Drecipe%%26id%%3D%@",APPLINKS_LINK,self.recipeID];
        name = self.recipeTitle;
        image = self.recipeImage;
        description = self.recipeTitle;


    object[@"title"] = name;
    object[@"type"] = [NSString stringWithFormat:@"%@:recipe",FacebookAppNamespace];
    object[@"description"] = description;
    object[@"image"] = @[@{@"url": image}]; //NOTE: tried a lot of variants here, thinking this is the cause
    object[@"url"] = url;

    [action setObject:object forKey:@"recipe"];
    params.action = action;
    params.actionType = [NSString stringWithFormat:@"%@:cook",FacebookAppNamespace];

    previewPropertyName = @"recipe";
    if([FBDialogs canPresentShareDialogWithOpenGraphActionParams:params]) {
        [FBDialogs presentShareDialogWithOpenGraphAction:action
                                          actionType:params.actionType
                                 previewPropertyName:previewPropertyName
                                             handler:dialogAppErrorHandler];

}
Boaz
  • 4,864
  • 12
  • 50
  • 90

2 Answers2

0

It is confirmed by Facebook that indeed this is a bug in SDK 3.19. Actually digging deeper says that this is a bug in Facebook app 15.0 so no need to change SDK

Boaz
  • 4,864
  • 12
  • 50
  • 90
0

I get a similar behavior (it allows me to post, but then i get "oops, something went wrong".

Somehow, when i tagged a friend in the share dialog, suddenly the entire story appeared (two-to-one), and then the posting/sharing works!

Try it!

(I still don't know how to make it work without it :( so it's still unacceptable)

mrtubis
  • 170
  • 7