开发者

Facebook Request 2.0

开发者 https://www.devze.com 2023-02-23 02:21 出处:网络
I am kind of confused on how to use the new facebook request dialog box. Using the below mentioned function opens a box and I am able to send the request to the user who receives it. But when the user

I am kind of confused on how to use the new facebook request dialog box. Using the below mentioned function opens a box and I am able to send the request to the user who receives it. But when the user clicks on the request nothing happens instead the user is redirected to an internal link:

http://www.facebook.com/?request_ids=105890902828361%2C105893002828151%2C105899456160839%2C105902046160580%2C105904092827042&notif_t=app_request

How to resolve the issue? (Canvas Page not defined in Settings but Canvas Url is)

function requestsDialog()
{
    FB.ui({
        method: 'apprequests', 
        message: 'Here is a new Requests dialog...',
        title: 'example',
        data: 'trackinginfo'
    }, 
    function(response) {
        if (response) {
            alert('Request was se开发者_开发知识库nt.');
        } else {
            alert('Request was not sent.');
        }
    }
    );
};


You need to specify a Canvas Page. For example, if your canvas page is:

http://apps.facebook.com/test_application

Then the URL that user will go to when clicking on the request will be:

http://apps.facebook.com/test_application?request_ids=12020393994,129193929392

At which point you can use the Graph API to look up what the requests are using the id (documentation here)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号