Facebook “invite friends” in a page tab

When I googled this, I actually found out that apprequests can only be made within an application, but not a page tab. This is true, when calling apprequests from a pagetab, the dialog opens but invites will not be sent. This problem can be avoided easily though:

1.assign a canvas URL to your app, make it the same URL as your page tab. Now inviting friends does work, but when they click the request, they’re being redirected to the canvas app (as opposed to the page tab).

2.It’s easy to find out what you’re on though, just check if fb_source is set andif so, redirect to your page tab:

if($_REQUEST['fb_source']){
    die("<script>window.top.location = 'http://www.facebook.com/PAGENAME/app_XXXXXXXXX'; </script>");
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.