Hi I've been trying to implement a similar solution for sharing a website using FBSDKShareDialog for iOS (FB SDK). From July, 2017 my current implementation is deprecated:
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = @"http://www.ironmaiden.com";
content.contentTitle = @"This is the best band ever";
content.imageURL = @"http://ironmaiden.com/media/images/book-of-souls-bg.png";
FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init];
The closest solution to this is by using FBSDKShareOpenGraphObject and set up the meta tags:
NSDictionary *properties = @{
@"og:type": @"website",
@"og:title": @"Up the Irons",
@"og:description": @"This is the best band ever",
@"og:image": @"http://ironmaiden.com/media/images/book-of-souls-bg.png",
@"og:url": @"http://www.ironmaiden.com"
};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"og.likes";
[action setObject:object forKey:@"og:object"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"og:object";
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
this works just fine except when I share it the action is displayed as: See example image here
Username likes an object on Iron Maiden Fan. : How can I rename the object to a something different like website ?
I found in documentation:
This action and associated object types are automatically added to the App Dashboard when you use the action for the first time.
But that's not very helpful, clearly I'm missing some set up either in FB Dashboard or FBSDKShareOpenGraphObject declaration, I appreciate any help