facebookfacebook-graph-apifacebook-social-pluginsx-facebook-platform

Facebook apprequests not working


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


Solution

  • 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).