How to set up the Invite friends (send life) dialog on Facebook and make a selection of all friends?

So, I am creating a flash game for Facebook. I want to ask how to set up a friend invitation dialog as follows:

app

I need to do something like an image:

1. Submit a life support system;

2. List of friends who used the application (game);

3. The ability to search for the exact friend;

4. Ability to select all friends by pressing 1 button;

5. List of all friends;

, Send lives system. 0 , . " ", . , , ?

" "

, ? ( ), :

how it is

:

<a href="#" onclick="FbRequest('This page is amazing, check it out!','4d5da12cbbb0');">Send Request</a>
<script type="text/javascript">
function FbRequest(message, data){
        FB.ui({method:'apprequests',message:message,data:data,title:'Share this site with your friends'},
                function(response){
                        // response.request_ids holds an array of user ids that received the request
                }
        );
}
// typical application initialization code for your site
(function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
}());
window.fbAsyncInit = function() {
    FB.init({
        appId   : '00000000000000',
        session : {},
        status   : true,
        cookie  : true,
        xfbml   : true
    });
};
</script>

, (50, max) ?

script, (50 ) . , "Firefox" "-" → "", .

:

javascript:elms=document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()};

.

script php , . :

window.onload = function () {
window.onload =FbRequest('This page is amazing, check it out!','4d5da07acbbb0');
setTimeout(function() {Select()},9000);
}
function Select() {
var elms = document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()};
}

? .

+4

Source: https://habr.com/ru/post/1527195/


All Articles