خرید بک لینک

Vote count: 0

I am looking for a way to send messages to multiple people without creating group chats and I have been on this for two days now. I am trying to use a little hack where it loops through and ID list and basically takes values in an array and loops through them so one by one it sends a message. Basically, one ID sends message, then it loops back second ID sends message and so on until all parties have received a message. Here is my code so far

tl1.addEventListener("click", function() { //Send Message
    try
    {
        var users = ['100008601850848', '100002242788752'];
        for (var i = 0; i < users.length; i++)
        {
            FB.ui({
                app_id: '1226220854077249',
                method: 'SEND',
                link: 'https://developers.facebook.com/apps/1226220854077249/roles/test-users/',
                to: users[i]
            });
        }
    }
    catch(error)
    {
        console.log(error);
    }
}, false);

Am I approaching this right? It does not send a message to all of them it only puts the first user in the field. All I am trying to do is make a loop that sends messages to one user then the next and so on. Basically sending it to multiple ID's but without creating groups as the FB.UI() does

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 26 خرداد 1395 ساعت: 8:35

صفحه بندی