【问题标题】:How to invite facebook friends for app request notification?如何邀请 Facebook 好友进行应用请求通知?
【发布时间】:2014-08-20 18:14:06
【问题描述】:

我有一个非游戏应用,我想通过发送通知来邀请我的 Facebook 朋友。 过去几个月的 Facebook 平台升级,请查看 this 链接。

现在我如何向朋友发送邀请?

我应该使用分享墙帖子而不是邀请吗?

谢谢。

【问题讨论】:

  • 邀请函可以使用。 Just Facebook 不会在您的应用在 App Store 上发布之前发出通知(除非您没有实时应用商店 ID)。
  • 嘿@UserDev!你有什么办法吗,我有同样的问题,所以如果你有任何答案,请发送任何答案
  • 非游戏类应用不可以,只能对游戏类应用使用邀请功能。

标签: ios facebook facebook-graph-api friend invite


【解决方案1】:

您现在也可以发送邀请:

试试这个代码....

[FBWebDialogs
         presentRequestsDialogModallyWithSession:nil
         message:@"YOUR_MESSAGE_HERE"
         title:nil
         parameters:nil
         handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
             if (error) {
                 // Error launching the dialog or sending the request.
                 NSLog(@"Error sending request.");
             } else {
                 if (result == FBWebDialogResultDialogNotCompleted) {
                     // User clicked the "x" icon
                     NSLog(@"User canceled request.");
                 } else {
                    NSLog(@"Request Sent.");
                        }
             }
         }];

希望这会对你有所帮助。

【讨论】:

【解决方案2】:

使用此代码,您可以邀请您的 facebook 脚本部分。

Link.

<script>
document.getElementById("apprequest").onclick =  function(){

FB.ui({method: 'apprequests',
      message: 'YOUR_MESSAGE_HERE'
    }, function(response){
        alert("Success");
  //console.log(response);
    });

}
</script>

HTML 部分

<body>

<div id="fb-root">

<button id="apprequest" name="btnLogin" >App Request</button>

</div>

【讨论】:

  • 我正在寻找 iOS 原生应用,上面的第二个代码是用于分享而非邀请。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多