facebook event; invite all friends with one click?

in Ideas and script requests
Subscribe to facebook event; invite all friends with one click? 6 posts, 6 voices



passoa User

Is it possible to make a script that allows you to invite all your friends to an event with a single click?

 
bjkoch User

Yup, I just wrote one that does that:


var numfriends = document.getElementById('friends').getElementsByTagName('li').length;

fs.click(document.getElementById('friends').getElementsByTagName('a')[1].parentNode);
for (var i=0; i < numfriends; i++) {
fs.click(document.getElementById('friends').getElementsByTagName('a')[i].parentNode);
}

It's a bit quick and dirty, but basically it goes through the entire friends list and executes the function that is performed onclick for each friend. Here's the short version that you can paste into the address bar to run the script:
javascript:var numfriends=document.getElementById('friends').getElementsByTagName('li').length;fs.click(document.getElementById('friends').getElementsByTagName('a')[1].parentNode);for(var i=0; i < numfriends; i++){fs.click(document.getElementById('friends').getElementsByTagName('a')[i].parentNode);}

 
Imran Khan User

Hello bjkoch!

I tried to use this code but it does not work.

Could you please explain a bit more how to use it properly. I will really appreciate this act of kindness.

With Best Wishes,

Imran

 
joshmc User

worked a treat for me. thanks

 
Shehab Napster User
FirefoxWindows

No Man The Code is 100 % Working

i tested it
its a nice one bjkoch

ThnQ

--------------------
javascript:var numfriends=document.getElementById('friends').getElementsByTagName('li').length;fs.click(document.getElementById('friends').getElementsByTagName('a')[1].parentNode);for(var i=0; i < numfriends; i++){fs.click(document.getElementById('friends').getElementsByTagName('a')[i].parentNode);}
-------------------

 
Nasif User
ChromeWindows

The code is not working anymore. However, I have made a new trick to do that ! Check it out http://www.bdtechie.com/how-do-i-invite-all-my-...