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
- iPhone
- iPad
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];