开发者

Facebook iframe Graph App Requests

  function sendRequest(c_id,page_id,user,g_id) {
        // alert(c_id);
        // alert(page_id);
        FB.ui({
    开发者_StackOverflow        method: 'apprequests',
            message: 'Custom messae!',
            title: 'Enter in this contest!',

            data: +id+','+puid+','+n_id,
        },
        function (response) {
           if (response && response.request_ids) {
               var requests = response.request_ids.join(',');
                    window.location.href = "mysiteurlhere";         

            } else {
                alert('canceled');
            }
        });
        return false;
    }

The above code works for multiuser but not single user even after adding TO field, I changed the code and used to field

method: 'apprequests',

to: sendto,

sendto has uid of user to whom i want to send the app request, I do get the invitation id but

$request_content = json_decode(file_get_contents("https://graph.facebook.com/$request_id?$app_token"), TRUE);
// returns false when i access the url

Am i missing something Multi User is working as smooth as it can be.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜