我正在使用来自facebook的ios好友请求对话框向我的应用发送用户邀请。在Facebook宣布关闭他们的API后,它停止了工作,有没有人知道如何邀请人们申请ios。
答案 0 :(得分:0)
您可以使用此代码。
- (void)inviteFriendsOfFacebook
{
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:[mArrTempSelected componentsJoinedByString:@","], @"suggestions", nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:textView.text
title:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Case A: Error launching the dialog or sending request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// Case B: User clicked the "x" icon
NSLog(@"User canceled request.");
}
else
{
[Helper showAlertForMessage:@"Invitation Sent Successfully." title:nil cancelButton:@"Ok" otherButton:nil andDelegate:nil withTag:0];
}
}}];
}
答案 1 :(得分:0)