I have created an invite friends code, which is properly working if an FB user is logged in.
If I remember correctly, it also worked, when there were no active fb users, in this case it simply shown a fb login page and then it went to an invitation.
Currently the 'invite facebook friends' link is really struggling, if there aren't any active facebook users.
FB.ui({
appId: '"' + appId + '"',
method: 'apprequests',
display: 'iframe',
message: '"' + message + '"',
title: 'Send your friends an application request'
},
function (response) {
if (response && response.request_ids) {
FB.api(response.request_ids, 'delete');
}
});
Did I do something wrong, or is this a bug in the Facebook invitation?
It seems, I got an answer on the Facebook bug site. However, it should help anybody , who has a lack of FB api knowledge . The documentation didn't show this example: If there aren't any active fb session , it just open a login screen. Finally I just realised what happened:
It doesn't show a login screen , if you use an IFRAME.
Do not use that!!
Thank you for Noorin Ladhani.
<script>
document.getElementById('send-to-many').onclick = function() {
FB.ui({
method: 'apprequests',
message: 'Visit my page'
}, Log.info.bind('send-to-many callback'));
}
</script>