Can I use [FBDialogs presentOSIntegratedShareDialogModallyFrom] to send an image to facebook via SDK 3.5?

When I use FBDialogs to post an image on facebook, facebook will show “via iOS” on the wall; How can I change “via iOS” to “through the name of my application” using the Facebook SDK 3.5?

[FBDialogs presentOSIntegratedShareDialogModallyFrom:self session:[FBSession activeSession] initialText:@"ABC" images:image urls:nil handler:^(FBOSIntegratedShareDialogResult result, NSError *error) { }]; 
+4
source share
1 answer

In the latest version of the SDK, you can use presentShareDialogWithPhotoParams to share the image. See the example below:

 FBShareDialogPhotoParams *photoParams = [FBShareDialogPhotoParams new]; UIImage *screenshot = // Your image... photoParams.photos = @[screenshot]; [FBDialogs presentShareDialogWithPhotoParams:photoParams clientState:nil handler:^(FBAppCall *call, NSDictionary *results, NSError *error) { }]; 
0
source

Source: https://habr.com/ru/post/1493579/


All Articles