1

Using presentShareDialogWithLink or Open Graph or something else, (how) can one post a large thumbnail on the web without a login-session (i.e. with a fast-app-switch)? Namely, the official-snippet doesn't present a large thumbnail on the web (as seen further below).

[FBDialogs presentShareDialogWithLink:[NSURL URLWithString:@"http://example.com/"]
                                 name:@"name"
                              caption:nil
                          description:@"description"
                              picture:[NSURL URLWithString:linkToAnImage]
                          clientState:nil
                              handler:^(FBAppCall *call, NSDictionary *results, NSError *error) 
                                      {}];

As seen below, the snippet does present the large thumbnail in iOS app, but the same share is on the web visible only as the old/small thumbnail on the left side. The image is of 2048 x 1072 resolution.

  • web

enter image description here

  • iPhone

enter image description here

  • iPad

enter image description here

Somewhat related question: Feed dialog doesn't publish large images

Another try with Open Graph

Under Facebook > Apps > Open Graph > I've created (1) share under > Action Types and (2) link under > Object Types. Then, using the snippet below, I do get the fast-switch-to-Facebook-iOS-app, but the share dialog disappears quickly and the top-right Post button is disabled (similar to this question). Facebook dashboard still shows (1) share action-type with a blue mark for Unapproved status, if that makes a difference when testing.

id object = [FBGraphObject openGraphObjectForPostWithType:[NSString stringWithFormat:@"%@:link", FBAppNamespace]
                                                    title:@"name"
                                                    image:@"http://link.com/to/an/image.jpg"
                                                      url:@"http://appstore.com/keynote"
                                              description:@"description"];

id<FBOpenGraphAction> action = (id<FBOpenGraphAction>)[FBGraphObject graphObject];
action[@"link"] = object;
FBOpenGraphActionShareDialogParams* params = [FBOpenGraphActionShareDialogParams new];
params.action = action;
params.actionType = [NSString stringWithFormat:@"%@:share", FBAppNamespace];
[FBDialogs presentShareDialogWithOpenGraphAction:params.action
                                          actionType:params.actionType
                                 previewPropertyName:@"link"
                                             handler:nil];
Community
  • 1
  • 1
Blaz
  • 3,548
  • 5
  • 26
  • 40
  • Have you gone through the https://developers.facebook.com/docs/opengraph/using-actions/#photos Adding photos to stories to column? – Harsh Mar 08 '14 at 07:41
  • @Harsh, no since mine aren't `user_generated`, but I did try Open Graph again (see the updated question). Sadly, after the fast-switch to iOS-Facebook, the shared dialog disappears (after a second or so), [as for this guy](http://stackoverflow.com/questions/21552944/facebook-share-dialog-on-ios-publish-button-always-greyed-out). – Blaz Mar 08 '14 at 11:32
  • Well, it seems it works at least with the `FBWebDialogs` as a backup. – Blaz Mar 15 '14 at 20:36
  • Have you implemented the correct OpenGraph tags as stated here: https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#tags and have you run your it through the Opengraph Debugger? – Tobi Mar 18 '14 at 08:17
  • @Tobi, how should I implement OG tags (e.g. `og:image`) in above, self-contained snippet? Or are these tags for use in web SDK, since the section you linked to starts with `"Open Graph tags are included in your page’s HTML ..."`? – Blaz Mar 18 '14 at 20:23

0 Answers0