Facebook应用邀请自动 [英] Facebook Application Invitation Automatically
问题描述
示例,
我的朋友X记录的CityVille应用程序,
我的朋友离线,但他发送CityVille邀请。
我要求你发送这个邀请?他说没有:)邀请从城市ville自动。 (没有fb对话框)
我该怎么做?
PS:
我的应用程序必需权限是:
电子邮件,offline_access,publish_stream,user_photos,read_friendlists
我尝试以下代码在我的朋友列表,但我不会发送邀请重试错误
$ app_id = $ this-> facebook_config ['appId'];
$ app_secret = $ this-> facebook_config ['secret'];
$ token_url =https://graph.facebook.com/oauth/access_token? 。
client_id =。 $ app_id。
& client_secret =。 $ app_secret。
& grant_type = client_credentials;
$ app_access_token = file_get_contents($ token_url);
$ user_id ='USERID';
$ apprequest_url =https://graph.facebook.com/。
$ user_id。
/ apprequests?message ='Mesaj'。
& data ='bisi'& 。
$ app_access_token。 &安培;方法=交;
$ r = file_get_contents($ apprequest_url);
echo $ r;
错误
{
错误:{
type:OAuthException,
message:(#200)参数中的所有用户必须已经接受TOS
}
}
据了解,您询问使用或邀请应用程序的用户而不是在应用程序中执行某些操作。那么AFAIK的唯一方法是通过电子邮件发送给他们。 Facebook不再允许这个了,其他默认的Facebook邀请对话框。
Facebook的API apprequests
是仅在连接的用户之间发送请求,例如得到这只失去的牛,或帮助我赢得这场战斗等等。
更新:邀请朋友连接的正确方法是使用Facebook JavaScript SDK。
FB.ui({method:'apprequests' ,
消息:'Plz添加这个,我需要你拼命使用这个程序!'
to:'any-friend-id'
});
我刚刚测试过,它允许我的兄弟使用它。
im developing a new facebook application and need to send Appusers frind list application invite.
Example, my friend X logged CityVille App, my friend is offline but he send CityVille Invite. i ask to X you send this invite ? he said no :) Invite getting from city ville Automatically. (No fb dialog)
How can i do this.
P.S: My App Required permissions is: email,offline_access,publish_stream,user_photos,read_friendlists
I tried following code on my friendlist, but i dont send invitation returing error
$app_id = $this->facebook_config['appId'];
$app_secret = $this->facebook_config['secret'];
$token_url = "https://graph.facebook.com/oauth/access_token?" .
"client_id=" . $app_id .
"&client_secret=" . $app_secret .
"&grant_type=client_credentials";
$app_access_token = file_get_contents($token_url);
$user_id = 'USERID';
$apprequest_url ="https://graph.facebook.com/" .
$user_id .
"/apprequests?message='Mesaj'" .
"&data='bisi'&" .
$app_access_token . "&method=post";
$r = file_get_contents($apprequest_url);
echo $r;
error
{
"error": {
"type": "OAuthException",
"message": "(#200) All users in param ids must have accepted TOS"
}
}
As I understand you're asking about requests to use or invite users to the application rather than do something in the application. Well AFAIK the only way to do this is by emailing them. Facebook just don't allow this anymore, other that the default Facebook invite dialog.
The Facebook's API apprequests
is to send request between the connected users only e.g. get this lost cow, or help me to win this battle ... etc.
Update: The proper way invite friends to connect is by using Facebook JavaScript SDK.
FB.ui({method: 'apprequests',
message: 'Plz add this, I need you to use this app desperately!',
to: 'any-friend-id'
});
I've just tested it and it allowed my brother to use it.
这篇关于Facebook应用邀请自动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!