我想邀请我的 Facebook 朋友使用我的应用程序。我成功邀请了他们,但我希望他们的 Facebook Id 用于我邀请的对象。我正在使用 FBSDKAppInviteDialog 邀请朋友。邀请他们后有什么方法可以获取 Facebook ID 吗?以下是我邀请 Facebook 朋友的代码。
#pragma mark
#pragma mark - Share via facebbok
- (IBAction)btnShare:(id)sender
{
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"https://fb.me/863075563772717"];
//optionally set previewImageURL
// present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
[FBSDKAppInviteDialog showWithContent:content
delegate:self]; // Do any additional setup after loading the view, typically from a nib.
}
-(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results
{
NSLog(@"result::%@",results);
}
-(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didFailWithError:(NSError *)error
{
NSLog(@"error::%@",error);
}
提前致谢 :)