Facebook 从用户朋友列表中邀请人们使用我的应用
Facebook invite people for my app from user friend list
我正在使用来自 Facebook 的 ios 好友请求对话框向用户发送我的应用程序的邀请。在 facebook 宣布关闭他们的 API 之后它停止工作了,有没有人知道如何邀请人们申请 ios.
您可以使用此代码。
- (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];
}
}}];
}
Facebook 已宣布这将仅适用于游戏应用程序,尽管可以这样做。只需在 Facebook 应用程序上为应用程序设置 canvas url 并使用 faecbook 请求对话框。这是非常有用的功能,因为任何 app.Facebook 正在开发此功能以便轻松使用。
我正在使用来自 Facebook 的 ios 好友请求对话框向用户发送我的应用程序的邀请。在 facebook 宣布关闭他们的 API 之后它停止工作了,有没有人知道如何邀请人们申请 ios.
您可以使用此代码。
- (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];
}
}}];
}
Facebook 已宣布这将仅适用于游戏应用程序,尽管可以这样做。只需在 Facebook 应用程序上为应用程序设置 canvas url 并使用 faecbook 请求对话框。这是非常有用的功能,因为任何 app.Facebook 正在开发此功能以便轻松使用。