我正在使用$.ajax
Facebook Invite 并调用 URL(Yii 框架控制器)。以下代码的$.ajax
一部分不起作用:
function FacebookInviteFriends()
{
FB.ui
(
{
method : 'apprequests',
data: '',
display: 'dialog',
title : 'Invite a Friend',
message: 'I just sent you an invitation to play My Game.',
filters: ['app_non_users']
}, function(response)
{
alert("start");
if (response && response.to)
{
alert("inside if");
$.ajax({
url: 'http://localhost:83/invitechips/createRecord',
type: 'POST',
data: {id : response.to}
}).done(function() {
alert( "Data Saved: ");
});
}
else
{
alert("inside else");
}
}
);
}