Facebook apprequests不工作 [英] Facebook apprequests not working

查看:144
本文介绍了Facebook apprequests不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  < HTML> 
< head>
< title>我的好网站< / title>
< / head>
< body>
< div id =fb-root>< / div>
< script src =http://connect.facebook.net/en_US/all.js>
< / script>
< script>
FB.init({
appId:'156154681125939',cookie:true,
status:true,xfbml:true
});

FB.ui({method:'apprequests',
message:'这是一个新的请求对话框...'});
< / script>
< / body>
< / html>

我正在使用此代码发送我的应用程序的应用程序(参考: http://developers.facebook.com/blog/post/464/



问题:我可以通过上面的代码加载请求对话框,并显示我的朋友列表。此外,我可以发送邀请。假设我将邀请发送给朋友X(提供X尚未使用我的应用程序)。然后在X的FB帐户中,apprequest书签数量增加1.但是当X试图看到应用程序邀请时,实际上看不到应用程序收到的任何应用程序邀请。我已经尝试过这个至少有5个用户,所有的发送邀请后,他们的apprequest书增加了1,但是当他们看到邀请时,实际上没有邀请。



任何人都可以建议我有什么问题?



注意:我的应用是网站(而不是画布应用)我的服务器上的代码位于 http://www.gmarjil.com/a.html

解决方案

这是非画布应用程序的预期行为。请求总是重定向到应用程序的画布网址,如果未设置请求,则不会显示。



请求仍然发送(这就是为什么请求计数增加) ,您可以通过图形API(https://graph.facebook.com/{user_id}/apprequests,需要应用访问令牌)来访问。


I have following code in html file:

<html>
<head>
<title>My Great Website</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
   FB.init({ 
       appId:'156154681125939', cookie:true, 
       status:true, xfbml:true 
   });

 FB.ui({ method: 'apprequests', 
   message: 'Here is a new Requests dialog...'});
</script>
</body>
</html>

I am using this code to send apprequests for my app (reference: http://developers.facebook.com/blog/post/464/)

Problem: I am able to load Request dialogue by above code, and it shows my friend list. Also I can send invited then. Say suppose I send the invite to friend "X" (provided "X" is not already using my app). Then in X's FB account, apprequest bookmark count is increases by 1. But when X is trying to see app invite, he actually cannot see any app invite received for my app. I have tried this with at least 5 users, all are getting their apprequest book incremented by 1 after I send the invite to them, but when they see the invite, there is actually no invite present.

Can anyone suggest me that what is the problem?

Note: My app is website (and not canvas app), also I have hosted above demo code on my server at http://www.gmarjil.com/a.html

解决方案

This is the expected behavior of non-canvas applications. Requests always redirect to the application's canvas URL and if it is not set the request is not displayed.

The request is still sent (this is why the requests count is increased), you can access it via the graph API (https://graph.facebook.com/{user_id}/apprequests, needs app access token).

这篇关于Facebook apprequests不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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