Kostadin Buglow
Kostadin Buglow

Reputation: 3

Facebook requests

I have made a facebook apps and users can send request to other users with that funciton

function inviteFriends(messagex, fr) {

FB.ui({ method: 'apprequests', filters: ['app_non_users'], 
    message: messagex},requestCallback);
}

Then in requestCallback function I save the request in mysql.

function requestCallback(response) {
    $.post("ajx/ajx.php", { "type": "saveRequests", "requests": response }, function(data) 
    {

   },'json');
}

In old applications everything working, but if I make a new app it doesn't work.

Upvotes: 0

Views: 163

Answers (1)

deadrunk
deadrunk

Reputation: 14125

Are you sure that there is no other JS errors? You can look at the in Chrome console, for instance.

function inviteFriends(messagex, fr) {
    console.log('inviteFriends:', messagex, fr);
    FB.ui({ method: 'apprequests', filters: ['app_non_users'], 
        message: messagex},requestCallback);
    }
}
function requestCallback(data) {
    console.log(data);
}

console.log('calling inviteFriends');
inviteFriends('hey', something);

Upvotes: 1

Related Questions