FBSDKShareDialog doesn't share Photo without Facebook App installed, IOS -


i using facebook sdk 4.0,https://developers.facebook.com/docs/sharing/ios#share_dialog using fbsdksharedialog share photo.it share photo if user has installed facebook app, fails when user hasn't installed fb app. "if doesn't have facebook app installed automatically falls web-based dialog." idk whats wrong please me in sharing photo using fbsdk 4.0.

my code

fbsdksharephoto *photo = [[fbsdksharephoto alloc] init]; photo.image = self.capturedimageview.image; photo.usergenerated = yes; fbsdksharephotocontent *content = [[fbsdksharephotocontent alloc] init]; content.photos = @[photo]; [fbsdksharedialog showfromviewcontroller:self                              withcontent:content                                 delegate:self]; 

this error report

enter image description here

error:"com.facebook.sdk:fbsdkerrorargumentnamekey=sharecontent, com.facebook.sdk:fbsdkerrordevelopermessagekey=feed share dialogs support fbsdksharelinkcontent."

fbsdksharedialog supports fbsdksharelinkcontent post image or url.so use share dialog have use fbsdksharelinkcontent.

enter image description here

you use follows :

fbsdksharelinkcontent *content = [[fbsdksharelinkcontent alloc] init];     content.imageurl = [nsurl urlwithstring:@"http://upload.wikimedia.org/wikipedia/commons/3/36/hopetoun_falls.jpg"];     [fbsdksharedialog showfromviewcontroller:self                                  withcontent:content                                     delegate:self]; 

if want share link use content.contenturl.

refer : https://developers.facebook.com/docs/sharing/ios#share_dialog

if using fbsdksharephoto need native facebook ios app installed.

refer :https://developers.facebook.com/docs/sharing/ios#photos


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -