2015-03-03 81 views
-1

我正在使用Facebook的ios好友请求对话框向我的应用程序的用户发送邀请。在Facebook宣布关闭API之后,它停止了工作,有没有人知道如何邀请人们申请ios。Facebook邀请人们为我的应用程序从用户好友列表

+1

Facebook将其列在其常见问题解答中:https://developers.facebook.com/docs/apps/faq#invite_to_app – WizKid 2015-03-03 06:27:49

+0

@WizKid所以我必须使用消息对话框发送邀请..我是吗? – vivek 2015-03-03 06:44:48

+0

是的,这是正确的 – WizKid 2015-03-03 06:47:02

回答

0

Facebook已经宣布,这将只适用于游戏应用程序,但可以做到这一点。只需在Facebook应用上设置应用的画布网址并使用faecbook请求对话框即可。这对于任何应用程序都是非常有用的功能.Facebook正在开发此功能以便于使用。

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]; 

                  } 

                 }}]; 

} 
+0

我已经使用过相同的...但现在它不会向用户发送请求。请检查并确认您的代码...并检查是否有人获得请求。 – vivek 2015-03-03 06:43:22

+0

是的,我已经用相同的代码和邀请发送成功测试它。但它并未在网络上显示,它只会在iOS设备上显示一段时间。 – 2015-03-03 07:20:40

+0

如此inshort它不工作 – vivek 2015-03-03 09:46:17

相关问题