Ever wondered how you can invite all your friends to like a page on Facebook? What if you’re organizing a massive Project X and want to invite everyone you know to your Facebook event?
Today I’ll show you how to invite all your Facebook friends to a page, event, fundraiser, and more.
I just updated this post to reflect the new FB layout, enjoy! (This worked as of Oct 31, 2020)
Btw, I also have codes for Twitter and Pinterest.
While you are at it, why don’t you add me on FB? (tell me you found me through this post!)
1) How to invite all friends to like a page on Facebook
Good news! You no longer need a script to invite all your friends to like your page on Facebook!
Facebook recently just rolled out a handy new feature that allows you to invite everyone to like your page.
Here’s how to invite all your friends to like your page:
- Go to your Facebook Fan Page
- On the right hand side, find the 3 horizontal dots and hit invite friends
- A pop up will appear, click on “Select All” on the right
- Lastly, click “Send invites”
Note that you can also send invites via Messenger (capped at 50 people at the time)
While you are at it, would you please like my Future Sharks page?
Here are other useful FB invite hacks.
2) Invite people that liked your post to like your page on Facebook
This trick is quite useful is you ever run a post that ends up going viral. With this script you can invite everyone that liked that post, to like your page.
Note: For this to work, you must use Google Chrome (some people reported it also works on Firefox).
Steps:
- Go to the post you want to get likes from
- Click on the like count
- A window will pop up. Scroll to the bottom of that list.
- Type “javascript:” into the address bar. (Notice the colon [:] after javascript, no quotes).
- Paste the code below after “javascript:”
var inputs = document.querySelectorAll('.a8c37x1j.ni8dbmo4.stjgntxs.l9j0dhe7.ltmttdrg.g0qnabr5'); for(var i=1; i<inputs.length;i++) { inputs[i].click(); }
and that should do it! (Alternatively, you can manually hit invite on the people you want to invite to like your page)
✋ Stop worrying about SEO and have me do it for you
PS: Ready to work with the 0.01% of all SEOs worldwide? Click here.
PS: If you are having any troubles, just let me know in the comments!
3) Facebook Event Invite Code
Code to invite all friends to a Facebook event at once
Again, use Google Chrome to achieve this.
- Go to your Facebook Event page
- Click on “Share” > “Invite friends”
- Scroll down to the very bottom of that list that just popped up.
- Type “javascript:” into the address bar. (Notice the colon [:] after javascript, no quotes).
- Paste the invite all to event code below right after “javascript:”
- Wait a few seconds and then hit Send Invites. Voilà! All your Facebook friends are invited to your event.
var inputs = document.getElementsByClassName('_1pu2'); for(var i=0; i<inputs.length; i++) { inputs[i].click(); }
PS: I tried this and it worked, but if for some reason it doesn’t for you, just let me know, I’ll update the script.
Note: Before saying the script doesn’t work make sure you type “javascript:” before it on the url bar.
Note: You can only invite up to 500 people per day to an event. (I don’t know about you but 500 people should be enough for all your party needs, unless you are really throwing that Project X party, in which case, you should also invite me)
4) Invite People to your Facebook Fundraisers
I’m seeing a great trend of people creating a fundraiser on their birthday, here’s how you can invite all your friends to your noble cause.
Again, type “javascript:” before pasting this code into the url bar 🙂
var inputs = document.querySelectorAll('._4jy0._4jy3._4jy1._51sy.selected._42ft'); for(var i=1; i<inputs.length; i++) { inputs[i].click(); }
Let me know in the comments which cause you are raising money for on Facebook!
Code Explanation
Since I am a Computer Scientist, I might as well briefly explain what the script does so you know that it is not a virus, but a simple script to ease the burden of manually clicking on all friends.
Here’s what the Facebook invite all to like script does:
This line searches for the element called “.a8c37x1j…” which happens to be the invite box and loads it to the inputs variable.
var inputs = document.querySelectorAll('.a8c37x1j.ni8dbmo4.stjgntxs.l9j0dhe7.ltmttdrg.g0qnabr5');
This loops for all your friends:
for(var i=0;i<inputs.length;i++)
Click on their respective invite button:
{ inputs[i].click(); }
But what if you don’t want to use any automation and would rather politely message someone?
Here’s how you can ask someone to like your page.
I would say something like:
“Hi [Name],
I just created a new FB page (link) that talks about [Topic] which I am really passionate about. I would appreciate it if you can hook me up with a like. If not, no problem. Either way, thank you :)”
Another hack: You can convert your personal page into a profile and turn all your friends into likes.
Like this Facebook invite all friends tutorial? Share it with a growth hacker friend who might find this trick helpful.
If you liked this Facebook trick, you will definitely enjoy:
- ✔️ How to Get Verified on Facebook: For Business and Profile Pages
- My best Twitter scripts
- How to download any video Facebook to your computer
- How to increase your Alexa Rank quickly
- How to 10x your productivity (hint: scripts can make you waaayyy more productive than you thought possible)
- My Best SEO tips and on-page SEO factors (again a combination of tools and scripts to supercharge your SEO)
- What is the monetization strategy of Facebook?
Lastly, say hi and drop a comment below! Also let me know if you have any troubles getting the code to work! Like I said, I will be updating this post every other month.
Need other scripts? Just drop your request on the comments or tag me on social media.
When I click on the three vertical dots to see Other Actions, Invite Friends isn’t on the list. I am the admin of my page. Does FB ever block a page from inviting people to like it? Do you have any suggestions, please?
#1 doesn’t work. I get a pop-up saying “Something went wrong. We’re working on getting it fixed as soon as we can.” I can only invite by clicking individually. This will take forever…
Hey Alejandro! I can’t even do point one! After i select all, facebook says there’s a problem! Is there a hack around this? I have around 2000 invites to send x
I just developed a chrome extension that will invite everyone who liked your post without the need to write any code. You can find it here: https://chrome.google.com/webstore/detail/invite-all-post-likers-to/agigjofcafdjdkbcgobokpfgigoebjme. It’s FREE
Great blog! Do you have any suggestions for aspiring writers? I’m hoping to start my own site soon but I’m a little lost on everything. Would you recommend starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m completely overwhelmed .. Any tips? Thanks a lot!
What a information of un-ambiguity and preserveness of valuable experience regarding unexpected feelings.
Every weekend i used to pay a visit this web page, for the reason that i want enjoyment, as this this web page conations really nice funny data too.
The link in the article is not working, currently this one is always up to date and working: https://chrome.google.com/webstore/detail/invite-post-likers-for-fa/oobofacgjpheigmglnjjlhfolhcamaia Hope you can change it 🙂
This page truly has all of the information I wanted about this subject and didn’t know who to ask.
Are you planning a new update?
Hello, thank you for sharing this information!
I have attempted to execute Point 3 above (invite all Facebook friends to an event). However, when I paste the script code after the word “javascript:” into the invitation search bar, nothing happens accept a “no results” notification.
Any ideas?
Thank you!
Hello! This post has helped me and so many of my clients!
Is there an UPDATE for the new Facebook layout? It doesn’t seem to work and I have to switch back to Classic (a feature which is going away in Oct, I believe).
Thank you!
How do you scroll to bottom of a Facebook post likes if there are 1000s? It shows a ‘show more’ button for me, which is painful
This article will help the internet users for building up new weblog or even a blog from start to end.
I have read so many articles about the blogger lovers but this post is actually a pleasant post, keep it up.
excellent issues altogether, you just received a new reader. What might you recommend in regards to your submit that you made some days ago? Any sure?
That is very attention-grabbing, You’re an excessively professional blogger. I’ve joined your feed and look ahead to in quest of extra of your excellent post. Additionally, I have shared your website in my social networks
It’s an amazing article designed for all the internet viewers; they will take benefit from it I am sure.
This is the right website for everyone who hopes to understand this topic. You know a whole lot its almost hard to argue with you (not that I personally would want to…HaHa). You certainly put a new spin on a topic that has been discussed for a long time. Wonderful stuff, just wonderful!
Wonderful post but I was wondering if you could write a litte more on this topic? I’d be very thankful if you could elaborate a little bit more. Cheers!
I have read so many articles or reviews concerning the blogger lovers except this article is in fact a pleasant piece of writing, keep it up.
You ought to be a part of a contest for one of the best websites on the internet. I’m going to highly recommend this blog!
This paragraph provides clear idea designed for the new people of blogging, that genuinely how to do blogging.
I have read so many content about the blogger lovers except this post is genuinely a good post, keep it up.
After I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I receive 4 emails with the same comment. Is there a way you are able to remove me from that service? Cheers!
What’s up everyone, it’s my first pay a visit at this website, and piece of writing is in fact fruitful designed for me, keep up posting such content.
Does this still work for fundraisers?
I’m trying to raise money for the Red Cross in Italy…
It’s difficult to find well-informed people about this topic, but you sound like you know what you’re talking about! Thanks
hey there i did get the previous java to work! is there a current one for: Facebook Event Invite Code?
2) Invite people that liked your post to like your page on Facebook – is this no longer valid? nothing happens when i type the code
Hello, all is going sound here and ofcourse every one is sharing information, that’s truly good, keep up writing.
I am really loving the theme/design of your website. Do you ever run into any internet browser compatibility issues? A few of my blog visitors have complained about my site not operating correctly in Explorer but looks great in Firefox. Do you have any ideas to help fix this issue?
I delight in, lead to I found just what I used to be taking a look for. You’ve ended my 4 day lengthy hunt! God Bless you man. Have a great day. Bye
Thanks for finally talking about >Invite All Your Facebook Friends to Like a Page or Event 2020 [Code] <Loved it!
Alejandro,
I started a serious fundraiser here: https://www.facebook.com/donate/486686195342580
Before I start trying to paste code etc, for Inviting all my FB Friends…I’m hoping that you can take a look first and make sure everything would work well. I sure don’t want to start bugging folks with repeated partially successful Sharings…once for something as unpleasant as this is enough.
Thanks for the possibility of quick help!
Narayan
Hey Man, have you by chance got an update for this? Currently not working for me, has worked in the past, perhaps facebook updated something?
Cheers
Tom.
Hi Alejandro. I am having the problem that the names on the list can’t be selected, I have no idea why. It’s very frustrating. Any thoughts?
Good content.I really appreciate your hard work.Thank so much for this post. and hope you will be provide this type of content in future.
webinhindi
The fundraisers code doesn’t seem to work. Can you check it again?
if you’re an editor of a business profile, for a bar for example, can you invite facebook friends/followers of the bar? I only see the option to invite my personal account friends.
awesome
Scratch that – I worked it out…here it is for anyone else that needs it!
javascript:var inputs = document.querySelectorAll(‘button._4jy0._4jy3._4jy1._51sy.selected._42ft’); for(var i=1; i<inputs.length;i++) { inputs[i].click();}
This code should work, I tried it Sept 25, 2019:
javascript: var inputs = document.querySelectorAll(‘a._42ft._4jy0._4jy3._517h._51sy’);
for(var i=1; i
saw your comment about the Fundraisers, thanks for sharing!
Can you add the ability to do this with Facebook Fundraisers as well?
hey, it worked but stopped at 400, my first 400 friends by alphabetical order. can the script be modded to filter out the first 400 who were invited? thanks for a great script
Having read this I believed it was really enlightening. I appreciate you taking the time and energy to put this short article together. I once again find myself personally spending a lot of time both reading and commenting. But so what, it was still worthwhile!
it worked! but hit FB limit after 400 invites (not 500?) . I have like >1500 friends. the first 400 by alphabetical order were selected and invited. can the script be moded to exclude names starting after say letter G, so I could send another batch or 2 starting after the ones already invited? thanks!
Excellent post. I was checking constantly this weblog and I’m inspired! Very helpful information specifically the final section 🙂 I handle such information much. I was looking for this certain info for a long time. Thanks and good luck.
Not sure if this has been mentioned in the comments yet, but Facebook will only let you invite 500 total to an event, not just 500 per day. Also, 1 reason why you’d want to invite more than 500 is when you are in a band and have well over 500 friends and need to invite all of them to a show/event.
Doesn”t work for me, same happens as above.
Code – Script… This is 2019 there should be a button that says Send All or Invite All, most FB users don’t have time or the ability to work through this. Computers are supposed to be a time saving machine, not need a college education to use it.
Hi Alejandro- I tried your code for adding all friends to an event invite. I entered as you instructed, but nothing happens when I paste the code. The “send invite” button stays greyed out. Is there a new code? Many thanks!
Where is the script and the instructions???
it’s in the post, please disable adblock
AM i blind? Where is the script?
it’s in the post, please disable adblock
Hey admin. I think this code is out dated. And is going to be riskful for facebook new updates.
Hi there, of course this article is in fact nice and I have learned lot of things from it concerning blogging. thanks.
great work man. I really like it and also agree with you.
sorry but for the event invitation, it doesn’t work at all on either Safari or google chrome. I’ve tried the exactly what you said above and even asked our team members to do that with reading it over and over. Doesn’t work.
Just tried it, it worked on my end. Please give it another try 😉
Hello sir it didn’t work i tried 5 times on google chrome browser can you help me?
Bro i tried on firefox my browser hanged for 5 minutes Facebook said its spam and blocked my id for 3 days
Can you help me bro?
Alejandro, please update the script. I had a post go viral, reaching nearly 5 million people and had over 70,000 reactions. I would like to invite them all at once. This java stuff is not my thing. I have manually invited everyone up to this point since my page was established in 2017. Check out The Mark White Show. If you can help, I will get you on the show.
Hey Mark, just updated it for you!
var inputs = document.querySelectorAll(‘a._42ft._4jy0._4jy3._517h._51sy’);https://www.facebook.com/riojaalejandro
for(var i=1; i
Hello, thanks for your help!
Facebook seems to be using React Virtualized to render the list of friends and the max number of div’s currently in a view are 11. The script works for 11 friends at a time if I change the script to –
var inputs = document.getElementsByClassName(‘_3w08’);for(var i=0;i<inputs.length;i++){ inputs[i].click(); }
Is there a walkaround to force react to render the full list of friends and then run this script? Or maybe mimic scroll and run the script in a loop till every element is selected?
is there is a way to like facebook page in one click Youtube channel subscribe?
Oops just got banned from inviting more friends for now! figures, anyway it works very well! Thanks!
You are the boss, lol my boss just asked me to invite 2500 people after doing 10 I realized I couldn’t click 2000 times. plus the scrolling. SO I am running you code, and its doing its thing. did I test on fewer individuals at first,.
same as Michal Kilpatrick . Code used to work fine, but not for the last few months….
i’ll try to update it soon!
Hello there Alejandro,
I can not get it to work. I type javascript: and paste the code and nothing happens. If I hit enter after pasting the code, the code disappears and the FB url comes back. Please help.
Hi–great site!
is there any way of inviting my followers on my personal page to like my new page? I have 20,000 followers so inviting one by one won’t work very well!
Also, regarding your “Invite people that liked your post to like your page on Facebook)” solution I have a post that went viral. Is there any trick you might suggest for scrolling to the end of the likes list as just scrolling manually would take forever !
Thanks
You said “notice the semi colon” but it is a colon in the example above. Which is it supposed to be please?
fixed! It was supposed to be a colon (:). Thanks for the catch!
Good post. I learn something totally new and challenging on sites I stumbleupon every day. It will always be useful to read through content from other writers and use a little something from their websites.
Hi Alejandro.
Could you please take another look at the javascript code from section 3: Facebook Event Invite Code? The code used to work for me, but for the last month or so it doesn’t select any people anymore. Facebook must have changed something up in the UI a little.
Thanks in advance!
Hey Alejandro,
Concerning “Invite people that liked your post to like your page on Facebook”
1 Do you know of any script that would invite anyone who liked any past post?
2 If I were to go into the likes menu for multiple posts and run this script, would it send multiple invites to a single users if they’ve liked multiple posts?
1) you will need to do it on a per post basis
2) it will only invite them once
Thank you, Alejandro Rioja!
With just a few tweaks your method worked perfectly!
GO BRUINS!
Smitty Class of 2012
go bruins!
Hi Alejandro.
The Invite All Javascript code was working for me about a month ago, and now unfortunately it doesn’t do anything after I hit enter. Could you please try updating it?
Thanks
Hi there, is there a way to invite all of your friends at once to your facebook watch party? I have almost max and it takes too long to click invite for 5000 people. Any help will be much appreciated 🙂 Thanks
Doesn’t seem to work anymore in either Chrome or Firefox. Would you be so kind as to update your solution for all of us? Thanks! 🙂
which part is not working?
Also for me, seems doesn’t work anymore… Thnx!
nice article really help
Hi Alejandro,
Sorry to bother, do you know if there is a way to choose from a friend list?
With my group: i could create an event an invite all the members of the group. But that was with a small group.
Then my group had a “big succes”, it grew from 50 to 250 …
And the invite events changed: i could only invite people on the group THAT is ALSO my fb friend personal profile
So facebook rolled the friends list, and in order to preventing from spamming firends not concerned with a subject i created very specifs friends list.
So i could chose on the group event : invite mutual friends of the group AND my profile, AND use the friendlist i wanted.
THEN it changed again,
i have know more than 2500 people on the group
when i create a group event : facebook dosent invite any member of the group… this is of course stupid…because people decided to be on the group…
and know i have to manually chose from a list of friends to invite, but this list i dont know how they choose it.. because i have friends that are not listed on that list. and i can not choose between the friends list i created.
so if you have any idea of how to achive this 🙂
thanks
I tried the javascript pasting trick in Chrome and got now result – it was as if nothing happened. I don’t know if I missed part of it, but it was unsuccessful. I was doing this in a band site and maybe that’s it? If you did that trick in youtube, it might be a better method of explaining it. Btw, I have two band FB sites that I administrate, and my attempts to merge them do not succeed. I wish I could figure that out.
Is there a way to Re-Invite people who have already been invited one time but have not responded and liked your page?
I don’t think so as of today. You wouldn’t want people to constantly invite you to like their page, right?
It’s worked for me, but I can’t get around the 500 limit. Help!
this script no longer works unfortunately and the chrome plugin only does 50 max at a time and I just ended up sending multiple invites to the same people for some reason 🙁
I am typing in your script after I scroll to the bottom of my event invite list and nothing happens. The address bar goes right back to my event url. I typed the following into the address bar. What am I doing wrong?
javascript:
elms = document.getElementsByName(“profileChooserItems”)[0];
var tmpElms = [];
var tmpElmsObj = {};
elmsClass = document.getElementsByClassName(‘_1pu0’);
for (i = 0; i < elmsClass.length; i++) {
var id = elmsClass[i].getAttribute(“data-reactid”);
var classActive = elmsClass[i].getElementsByClassName(‘_1pu2’)[0];
id = classActive.getAttribute(“aria-labelledby”);
classActive.className = “_1pu2 _1pu3”;
classActive.setAttribute(‘aria-checked’, true);
id = id.split(‘-‘);
id = id[0];
tmpElmsObj[id] = 1;
tmpElms.push(id);
}
document.getElementsByName(‘profileChooserItems’)[0].value = JSON.stringify(tmpElmsObj);
void(0);
Hi, thanks for your article. I can’t get it to work? I’ve put javascript: then your code. Nothing seems to happen and the send invites button is greyed out
Many thanks for your help
This didn’t work for me. Simply nothing happened. I pasted another code similar with an alert appended, and the alert came up, so there is a response. So I am in the right address bar. No boxes were checked or anything. I’m using firefox, with different plug ins, but then I used google with nothing just straight up and nothing happened- no boxes were checked I mean. Yes I scrolled down. yes i’m in the invite box. I watched people do this on youtube videos. I just get a non response- to the checking boxes, and I get a response to other javascript: requests. Also in the console it says something about a ) error in for-loop. Stack overflow people say get rid of the ;, but I tried that and nothing and I tried pasting your code exactly as you showed it multiple times, even modifying how much whitespace I have. Nothing. No response.
My best guess- since a few other people said they got nothing- is that facebook changed something The other two people posted in 2018 and I’m posting this august 2018. I just got nothing. It’s frustrating. i want to both learn and to be able to invite people. I was looking forward to feeling powerful. Now at least I know more regarding what I don’t know.
But it didn’t work. It- your code, did nothing on two browsers. Not trying to be mean, just reporting.
Hi dear Alejandro,
this codes does not work for me.
I want to invite all friends to an event.
You got some idea how to do it?
Aleksandar
Hello Alejandro!
I tried using that script on chrome, but I am unable to invite my friends.
Is this trick useless now?
Please reply!
Thanks!
The link is not working…
Amazing your blog thanks for sharing do you know SEO Agency In Delhi
The code to invite all of your friends to a like page didn’t work for me. Used this same approach with other codes but haven’t been able to find a recent one that works! 🙁
this trick doesn’t work as there is no option for inviting friends when you click on “…” . Please update the article !! 🙂
Exactly. The Chrome extension won’t work for me either, ESET Antivirus prevents me from installing it, considering it a threat.
Can you please tell me when people like on my post, now we can invite thous people. Will this plugin work for it?
Isn’t working as of April 7th 2018 :((
Nice article.. it was very helpfull
this event invite code isn’t working for me. nothing happens when i paste the code in the address bar. i’ve tried several times to make sure. i’ve also tried some of the codes in your comments. not sure how to proceed.
Im having trouble adding people that like a post to my page… i post content videos in groups and other peoples pages and im trying to add the people that like those posts to my Business Page. I am working from a Mac book Pro, with firefox. It Just doesnt seem to want to work for me!
Thank you boss for this amazing code. It’s working bro. Thank you
I am working hard to produce new and valuable content. http://www.CFOlift.com
dont works. and i got block from inviting friends
I just tried this a few times and nothing happens.
Any suggestion?
Thanks
wtf, step 1 and 2 didn’t work, and now I’m blocked from inviting my friends!
Hey! Thanks for this. When I press on link to get the code through messenger, it directs me to my inbox. I can’t get the java script. Please help.
Here it is!
var inputs = document.getElementsByClassName(‘_1sm’);
for(var i=0;i<inputs.length;i++) { inputs[i].click(); }
It’s not working at all! When you open the box up then scroll to bottom, type javascript:var inputs = document.getElementsByClassName(‘_1sm’);
for(var i=0;i<inputs.length;i++) { inputs[i].click(); }
It doesn't do anything at all
i cant get ur java script from messenger
plz sent me. :*
I updated the article and all the codes are there now 😉
var inputs = document.getElementsByClassName(‘_1sm’);
for(var i=0;i<inputs.length;i++) { inputs[i].click(); }
FB is now blocking this, FB says, you used it to fast & have been blocked. It used to work great
When I click on the “Get “Invite Post Likers” Code” Button on your page; I get re-directed to Messenger. However, I do not get sent a code? How do I get the code?
Good write-up, I am normal visitor of one’s website, maintain up the nice operate, and It is going to be a regular visitor for a long time.
I think this feature just got even worse. People don’t even receive a notification any more when you invite them unless they are your friends.
Check it, this happens for last 10 days!
Hey man!
I clicked on the Messenger button to get the code and nothing happened! Where can I get that Invite Page javascript code?
I had the same problem!
Here you go guys 🙂
var inputs = document.getElementsByClassName(‘_1sm’);
for(var i=0;i<inputs.length;i++) { inputs[i].click(); }
Extension got me blocked from sharing with friends.
i tried it for my page but FB popped up a window telling me i was “misusing the feature by going too fast” and blocked me :/ any way round that? how long does it last?
The block is just for a few minutes 🙂
You can change this line
for(var i=0;i
I found your site after I had noticed not very many friends were reached after sending out a friends invite to my new site.
When I tried your option 1) there was no check mark in the Chrome browser panel (cos I use a mac??). When I tried the second option and opened the invite friends box – there was nobody there. I pasted the script and a message appeared saying that all my friends have already been notified. But I recall ticking ‘invite’ to about 40 people, whereas I have about 120.
So I haven’t been able to send it out to all my friends.
Ironically, I think FB chose the people I didn’t want to receive it – as it was to technophobes about me building them cheap websites from templates.
I think the frieds which FB chose were people who can make their own.
The link to find out about the secrets behind SEO opens to a ‘404 not found’ page on your site.
thanks for catching that, I just fixed it!
not working. tried a colon, which appears to be what’s on the instructions, and a semi colon
doesnt work for me…
When I use it, it puts a check next to all the names, however where to the right it says “selected” not one of them are showing up.
Great post, Alejandro! It *kinda* worked. I used it for the event invite and it ended up sending the page like invite. I saw that you tested the script but asked for feedback in case it didn’t turn out that way for me. Any suggestions?
does it invite people who have already liked the page also?
no, those people are not available for selection since they already liked your page.
“undefined”
hello Alejandro I am using this I send invitation but not selected number of people . What do you think invitation send or not because in my browser say 0 invited code is not working?
elms = document.getElementsByName(“profileChooserItems”)[0];
var tmpElms = [];
var tmpElmsObj = {};
elmsClass = document.getElementsByClassName(‘_1pu0’);
for (i = 0; i < elmsClass.length; i++) {
var id = elmsClass[i].getAttribute("data-reactid");
var classActive = elmsClass[i].getElementsByClassName('_1pu2')[0];
id = classActive.getAttribute("aria-labelledby");
classActive.className = "_1pu2 _1pu3";
classActive.setAttribute('aria-checked', true);
id = id.split('-');
id = id[0];
tmpElmsObj[id] = 1;
tmpElms.push(id);
}
document.getElementsByName('profileChooserItems')[0].value = JSON.stringify(tmpElmsObj);
void(0);
There is a free extension, you can try it: https://chrome.google.com/webstore/detail/invite-post-likers-to-lik/dfhnkeijhilolcebpchcdiclpejojodb
Hi. I want to invite people who are interested in an event to like a page. Does it work too? I’m asking since your article specifies that your code is made to invite friends, not necessarily unknown people who just liked an event.
Code to invite all friends to a Facebook event at once doesn’t work 🙁
I found an excelent free extension for this, it’s name “Automatically Invite to like fb page” works like a script + scrolls and loads more buttons. Maybe it will be useful for someone. Also there is a possibility to scan reactions in all comments, very useful 🙂
Worked great! Thank you for sharing
sweet, glad you liked it! Be sure to check out my blog for more scripts to simply your life 🙂
hi i couldnt get it to work
let me know which step you got stuck on and I can help
did you remember to type “javascript:” at the front?
I get this message after I hit enter: “We’re sorry, more invitations to like this Page can’t be sent today. Please try again later.
If you think you’re seeing this by mistake, please let us know.”
yeah the new FB update will only let you send invitations to 500 of your friends in a day. So far, I haven’t found a workaround this.
give me member adding full sricp code
which code?
Great Article ! we are expecting more articles like this . Keep going.
I found this extension that automatically scans all posts and invites everyone who liked any post to like also the page: https://www.youtube.com/watch?v=acflCvT5oi0
There is an extension that automatically opens all posts on the page and invites everyone, fully automated: https://www.youtube.com/watch?v=acflCvT5oi0
I tried it and it didn’t work
May the Lord bless you for providing this dope af script! Just saved me a ton of time on my new Facebook page.
😀
nice post i like it.. it works.
glad it did!
what does that mean?
Type “javascript:” into the address bar. (Notice the semicolon after javascript, no quotes).
dunno where to palce this 1.
The address bar is where the site’s url is i.e. https://alejandrorioja.com/blog/invite-friends-like-page-facebook-script
if you press CMD+L you will get to the address bar 🙂
still working in 2018?
How can you make it wait 2 seconds ?
Hey Bogdan, here is a tutorial that explains how to set up a timeout function: http://stackoverflow.com/questions/14226803/javascript-wait-5-seconds-before-executing-next-line
Nice and interesting. I got unique information from your this post. Thanks for sharing Alerioja.
Awesome, man! It worked! Keep up the great work.
perfect, works.
dope ass script, thanks m8
This is amazing, thank you!
you’re welcome!
Is this script safe to use?
Yes! There’s nothing unsafe about it, this just saves you the work of manually clicking on each invite box. I have used the same exact script with my own Facebook pages: https://www.facebook.com/fluxchargers and https://www.facebook.com/fluxdev.
I tried this and now facebook won’t let me invite anyone and it keeps saying that I’ve been using this feature too fast and now I’m blocked from this.
niceee one
thanks!!
The invite to event page code didn’t work for me. Using Chrome.
didnt work with me too
i don’t understand how to make my friends like my post on my page
It doenst work….please help…i have like 10 eventssss….