我的info.plist
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"https://fb.me/450262455167157"];
//optionally set previewImageURL
content.appInvitePreviewImageURL = [NSURL URLWithString:@"https://www.apple.com/my_invite_image.jpg"];
// present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
[FBSDKAppInviteDialog showFromViewController: self
withContent: content
delegate: self
];
//FBSDKAppInviteDialog delegate
-(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results
{
NSLog(@"%@",results);
}
-(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didFailWithError:(NSError *)error
{
NSLog(@"%@",error);
}