Alejandro
Rioja.
Hire me →
Scripts SEO

Invite All Your Facebook Friends to Like a Page or Event on Facebook 2026

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…

Alejandro Rioja
Alejandro Rioja
Updated 5 min read

Table of contents

Open Table of contents

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:

While you are at it, would you please like my Future Sharks page?

Here are other useful FB invite hacks.

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:

  1. Go to the post you want to get likes from

  2. Click on the like count

    invite post to like

  3. A window will pop up. Scroll to the bottom of that list.

  4. Type “javascript:” into the address bar. (Notice the colon after javascript, no quotes).   

  5. 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.click(); }

and that should do it! (Alternatively, you can manually hit invite on the people you want to invite to like your page)

PS: If you are having any troubles, just let me know in the comments!

Facebook Event Invite Code

Code to invite all friends to a Facebook event at once

Again, use Google Chrome to achieve this.

  1. Go to your Facebook Event page

  2. Click on “Share” > “Invite friends”

    invite to event

  3. Scroll down to the very bottom of that list that just popped up.

  4. Type “javascript:” into the address bar. (Notice the colon after javascript, no quotes).   

  5. Paste the invite all to event code below right after “javascript:”

  6. 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.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)

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.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.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 ,
I just created a new FB page (link) that talks about 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:

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.


This guide is part of alejandrorioja.com — written by Alejandro Rioja, who now builds AI agent systems for founders. Including the agent that keeps this site current. How it works →

Updated for May 2026

A few things have shifted since this post first went up. Meta dropped the legacy “Page” verification track in 2024 and folded it into Meta Verified ($14.99–$19.99/mo depending on tier and country) — the blue check is now a subscription, not a one-time review. Friend-request flows still work as described, though Meta moved the bulk-cancel UI deeper into mobile settings; the desktop m.facebook.com/friends/center/requests/outgoing route still works (2026-04 spot check).

Worth knowing in 2026: ~3.07B Facebook MAU (Meta Q4 2025 earnings), but the share of time-on-platform relative to Reels and WhatsApp has continued sliding. If this post is part of an outreach strategy, weight WhatsApp and Threads (yes — Threads survived the 2024 pivot speculation and crossed 200M MAU) accordingly.

Keep reading

Related essays

Keep reading

Get the GEO Playbook in your inbox

Every Wednesday. 28,400+ operators. Zero fluff.

Subscribe →