Skip to content

Commit

Permalink
Update Facebook SDK 4.31.1 for iOS 11 (jeduan#634)
Browse files Browse the repository at this point in the history
* Update FacebookSDKs-iOS-4.31.1

* contentTitle, imageURL and contentDescription have been deprecated in Facebook API 2.9

* Update README according deprecation
  • Loading branch information
peterpeterparker authored Mar 23, 2018
1 parent 39ac985 commit 0b4153a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ Share Dialog:
share_feedWeb: true, // iOS only
}

For iOS, the default dialog mode is [`FBSDKShareDialogModeAutomatic`](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/). You can share that by adding a specific dialog mode parameter. The available share dialog modes are: `share_sheet`, `share_feedBrowser`, `share_native` and `share_feedWeb`. [Read more about share dialog modes](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/)
#### iOS

The default dialog mode is [`FBSDKShareDialogModeAutomatic`](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/). You can share that by adding a specific dialog mode parameter. The available share dialog modes are: `share_sheet`, `share_feedBrowser`, `share_native` and `share_feedWeb`. [Read more about share dialog modes](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/)

`caption`, `description` and `picture` were deprecated in Facebok API [v2.9](https://developers.facebook.com/docs/graph-api/changelog/version2.9#gapi-deprecate) and therefore not supported anymore on iOS

Game request:

Expand Down
6 changes: 0 additions & 6 deletions src/ios/FacebookConnectPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ - (void) showDialog:(CDVInvokedUrlCommand*)command
// Create native params
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:[params objectForKey:@"link"]];
content.contentTitle = [params objectForKey:@"caption"];
content.imageURL = [NSURL URLWithString:[params objectForKey:@"picture"]];
content.contentDescription = [params objectForKey:@"description"];

self.dialogCallbackId = command.callbackId;
[FBSDKMessageDialog showWithContent:content delegate:self];
Expand All @@ -284,9 +281,6 @@ - (void) showDialog:(CDVInvokedUrlCommand*)command
// Create native params
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:params[@"href"]];
content.contentTitle = params[@"caption"];
content.imageURL = [NSURL URLWithString:params[@"picture"]];
content.contentDescription = params[@"description"];
content.hashtag = [FBSDKHashtag hashtagWithString:[params objectForKey:@"hashtag"]];
content.quote = params[@"quote"];

Expand Down

0 comments on commit 0b4153a

Please sign in to comment.