FB.ui request dialogs: how are the requests processed and how to keep it in canvas
-
26-10-2019 - |
Question
Haven't done an app in a couple of years and I feel like I'm lost in the forest. :-)
Using the following test code in my app:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'myappid',
status : true,
cookie : true,
xfbml : true,
channelUrl : 'http://www.example.com/myapp/channel.html',
oauth : true
});
FB.ui({ method: 'apprequests',
message: 'Here is a new Requests dialog...'});
</script>
This, as expected, produces a list of my friends but after I select one and hit Send Request the other person never receives the request.
1) Am I supposed to process it in some other way first? Unless I'm seriously caffeine deprived I don't see what I'm supposed to do next. 2) Is there any way to keep the friend list box in the canvas page as opposed to a pop-up?
Thanks. I'm sorry if this sounds basic but, wow, sometimes the FB documentation gives you a glimpse of what you're supposed to do but doesn't give you all the info. It's like a programming version of flash cards.
Solution
1) your friends should be able to receive the app request (probably they just miss it / don't know where the app requeust is shown). see if they can see the request at http://www.facebook.com/reqs.php
2) make sure the user is login and connect to your app before calling FB.ui. This can be done, say by using the FB.getLoginStatus method