如何通过Facebook iOS SDK和Graph API邀请朋友到我的应用程序 [英] How to invite friends to my application via facebook iOS SDK and Graph API

查看:165
本文介绍了如何通过Facebook iOS SDK和Graph API邀请朋友到我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个iPhone应用程序。

I'm writing an iPhone application.

我想给用户邀请朋友开始通过Facebook开始使用我的应用程序的选项。

I want to give the user the option to invite friends to start using my application via Facebook.

更具体地说,我想提出一个对话框,让用户选择特定的朋友邀请。

More specifically I want to present a dialog that will let the user to select specific friends to invite.

我该怎么做

谢谢。

推荐答案

很简单,你可以写以下代码为个性化消息,您也可以轻松地选择要发送请求的朋友,这是一个直截了当的强大方法。

It's simple you can just write the below code for personalised message and also you can easily select the friend's to whom the request should be sent, it's an straight forward and powerful method.

 [FBWebDialogs
 presentRequestsDialogModallyWithSession:nil
 message:NSLocalizedString(@"FBinviteMessage", nil)
 title:nil
 parameters:nil
 handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {}
];

只需将这六行代码添加到您的Button操作方法中,其余的将由IOS& FaceBook Inbuilt框架:)

Just add this six line of code to your Button action method, then the rest will be done by the IOS & FaceBook Inbuilt framework :)

这篇关于如何通过Facebook iOS SDK和Graph API邀请朋友到我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆