UIImage *image = [UIImage imageNamed:@"attachment_blank.png"];
FBSDKSharePhoto *photo = [FBSDKSharePhoto photoWithImage:image userGenerated:NO];
NSDictionary *properties = @{
@"og:type": @"app:recipe",
@"og:title": @"Sample Recipe",
@"og:description": @"",
@"og:url": @"http://samples.ogp.me/216213502062059",
@"og:image": @[photo]
};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareAPI *shareAPI = [[FBSDKShareAPI alloc] init];
[shareAPI createOpenGraphObject:object];
The submission guidelines speak about a "user generated photos" permission that doesn't seem to be available anywhere in the app settings, or anywhere else in the documentation. Is that still required? Is there a similar permission for images?
You can try this method to share an image with link. The image you want to share should need to be on server(i.e. you need to use link of an image ) Note:- You must have an "publish_actions" permission from facebook app
Below method is shown using the facebook sdk 4.3
In .h file
In .m file