Fbsdksharephoto Not Sharing Link Alongside Photo Using Swift

Add UIImage directly into FBSDKShareLinkContent with Swift?

Appears that the FBSDKSharePhotoContent is the way to go, but there is currently a bug that Facebook is aware of, which is causing the image & link to not work together.

https://developers.facebook.com/bugs/949486035103197/

They say this should be updated in the next Facebook app update v31. v30 was updated May 7 and FB releases updates every two weeks, so I'll check back in a week and confirm that the functionality is fixed.

Swift iOS Facebook SDK: How to share an animated GIF?

This is not as issue with your image due to Facebook natively not support gif image directly uploaded on it.

You can share gif image link on Facebook and it will show there gif image. Like as commonly peoples are using giphy, tenor website and share gif image link from this website. So gif image display via this type of website.

I hope this will help you.

Sharing content with facebook sdk 4.0 + iOS

There was a bug in the earlier version of FB SDK, but here it seems that you are missing a required implementation of a delegate methods.

        FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = //YOUR IMAGE photo.userGenerated = YES;
FBSDKSharePhotoContent * photoContent = [[FBSDKSharePhotoContent alloc] init];
photoContent.photos = @[photo];
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
shareDialog.shareContent = photoContent;
shareDialog.delegate = (id)self;
shareDialog.fromViewController = self;
NSError * error = nil;
BOOL validation = [shareDialog validateWithError:&error];
if (validation) {
[shareDialog show];
}

And implement the required delegates method

- (void)sharer:(id<FBSDKSharing>)sharer didCompleteWithResults:(NSDictionary *)results {
// handle
}
- (void)sharer:(id<FBSDKSharing>)sharer didFailWithError:(NSError *)error{
// handle
}
- (void)sharerDidCancel:(id<FBSDKSharing>)sharer{
// handle
}


Related Topics



Leave a reply



Submit