I am using this to invite a friend of facebook to my app:
function invite(id) {
FB.ui({
method: 'apprequests',
message: 'mytext',
title: 'mytitle',
to: id,
}, function(response){
if (typeof response.error_message != 'undefined') {
console.log(response.error_message);
}else{
if(response!=null){
var invitados = id.split(',');
for( i=0; i<invitados.length; i++){
$('#friend_'+invitados[i]).addClass('invited');
}
}
}
});
}
The problem is that I don't have ssl certificate in my server, yet (And I know this should be solved by installing it. Since facebook moved to secure login, we only need ssl to display our site in facebook's site)
And some users get a 501 error from facebook:
(net::ERR_INSECURE_RESPONSE):
Is there a way to force opening the request (maybe in _blank) in my site instead of in facebook (inside the ifame)?
Is there a way to force opening the request (maybe in _blank) in my site instead of in facebook (inside the ifame)?
Nope.
https://developers.facebook.com/docs/requests/:
User to User Requests are only available for Canvas apps, not websites, as accepting a request will direct the user to the Canvas Page URL of the app that sent the Request.