Facebook apprequests not working
Asked Answered
H

2

3

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

Harwilll answered 20/11, 2011 at 20:22 Comment(0)
T
17

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

Touchback answered 21/11, 2011 at 11:41 Comment(2)
This is a duplicate of http://facebook.https://mcmap.net/q/456334/-why-it-shows-quot-app-requests-1-quot-but-no-requests-listed-in-the-app-pages-on-facebookTouchback
My App is not a game. Can I also create a canvas URl for my app ?Fireguard
O
0

Even if your app is not a game you can give any url as the canvas uri in the facebook app setting.The url even if invalid will allow teh notifications to send.This solved my issue.

Operand answered 13/8, 2015 at 11:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.