A clever trick to automatically invite all your Facebook friends to be fans of your page

For folks that have a personal profile (a “standard” account), you can use a clever trick to invite all of these friends to fan the page.  There is no way to automatically import.  When you’re on the Facebook fan page that you want to invite all your friends to, you hit “suggest to friends” under your profile picture and then paste this code into the address bar to automatically select everyone:

javascript:elms=document.getElementById(‘friends’).getElementsByTagName(‘li’);for(var fid in elms){if(typeof elms[fid] === ‘object’){fs.click(elms[fid]);}}

If you have thousands of friends, like I do, then this will save you hours each time.



About Dennis Yu

Dennis Yu is the Chief Executive Officer of BlitzMetrics. He is an internationally recognized lecturer in Facebook marketing, having been featured in The Wall Street Journal, New York Times, LA Times, National Public Radio, TechCrunch, Fox News, and CBS Evening News. He is also a regular contributor for Adweek's SocialTimes column. Dennis has held leadership positions at Yahoo! and American Airlines. He studied Finance and Economics from Southern Methodist University and London School of Economics. Besides being a Facebook data and ad geek, you can find him eating chicken wings or playing Ultimate Frisbee in a city near you. You can contact him at dennis@blitzmetrics.com, his blog, or on Facebook.

29 thoughts on “A clever trick to automatically invite all your Facebook friends to be fans of your page

  1. Benn

    Hi Dennis,

    I just tried to copy paste that JS to the address bar, clicked enter but nothing happens after. Maybe you can post up some screenshots on how it works?

  2. TrafficColeman


    Facebook is center around friends that you can contact at will and discuss situations. My experience with it is that its no differ than any other social

    marketing concept…find friends.. and request more friends.

    I wrote a article on my blog about the friend gathering process that most people use to gain more friends on facebook. I must say that blog got a lot of

    attention by thousands of curious people who wanted to know how they can gain more friends fro face book without the spamming.

    It was my goal to show people that it doesn’t matter if you got 100 facebook friends or the limit of 5,000…if no one knows who you really are, than doing

    friend request is just a waste of time.

    You must concentrate on branding yourself before doing face book friend invites.

    Thanks for letting me post my crazy thoughts..

    TrafficColeman ‘Signing Off”

  3. keith mander

    I’m with TrafficColeman – doing this repeatedly will just end up resulting in yourself being branded as a spammer. I’ve de-friended someone before for continually inviting me to join a Page – it became ridiculously annoying.

  4. Dennis Yu Post author

    @TrafficColeman and @kmander– totally agreed! With anything, overuse of a tactic is spam, as well as promoting items that are irrelevant to your friends. Bad taste whether on the internet or not. I’ll use this tactic once every few months– while I normally manually invite friends to items that I specifically choose.

  5. Jeremy

    great tip..not sure if it worked..you paste that code into the “Find Friends” search box? When you paste the code, it doesn’t select all friends..Is it b/c I have a Macbook? You rock! Thanks in advance for clarifying..

  6. Dennis Yu Post author

    Should work in FF and Safari on Mac– my main computer is a Mac. You’ll know it works when you see all your friends highlighted in the suggestion box. Are you pasting the url into the browser address bar, as opposed to one of the Facebook search boxes?

  7. AC

    Thanks for posting. When I paste: javascript:elms=document.getElementById(‘friends’).getElementsByTagName(‘li’);for(var fid in elms){if(typeof elms[fid] === ‘object’){fs.click(elms[fid]);}}

    I just see a blank page where all my friends were. Does this still work on FB? Much thanks. 🙂

  8. Ben Linford

    Neat little trick.
    It’s a shame about the complexity of the method for the basic user, but that can’t be helped, as it’s obviously just a workaround for a Facebook restriction.

  9. Ann Baker

    Hi Dennis –

    I’m having the same problem. I’ve tried pasting the code into the box next to “Find Friends”: and then the area that was featuring my friends’ photos goes blank. Am I pasting the code in the right place?

  10. google adwords tool

    Thank you for any other excellent post. The place else may anybody get that kind of
    info in such a perfect means of writing? I have a presentation subsequent week, and I am at the look for such info.

  11. buy youtube views

    Hello! I could have sworn I’ve been to this website before but after going through many of the posts I realized
    it’s new to me. Regardless, I’m definitely delighted
    I stumbled upon it and I’ll be book-marking it and checking back

  12. Giagaleilyaykq.beeplog.com

    Hi there! Quick question that’s totally off topic.
    Do you know how to make your site mobile friendly? My blog looks
    weird when browsing from my iphone. I’m trying
    to find a template or plugin that might be able to correct this issue.
    If you have any suggestions, please share. Cheers!

  13. yahoo

    Thanks for ones marvelous posting! I certainly enjoyed reading it, you
    can be a great author.I will be sure to bookmark your blog and may come back later on.
    I want to encourage you to continue your great posts, have a nice

  14. how to get more fans

    Hi! I’ve been following your website for a long time now and finally got the
    bravery to go ahead and give you a shout out
    from Kingwood Tx! Just wanted to say keep up the fantastic work!

  15. good quality backpacks

    Excellent post. I used to be checking continuously this weblog and I am inspired!
    Extremely useful information particularly the closing
    part 🙂 I care for such information a lot. I was seeking this particular info for a very long
    time. Thanks and good luck.

  16. social media plan

    I’m curious to find out what blog platform you have been using?

    I’m experiencing some minor security issues with my latest website and
    I’d like to find something more safe. Do you have any suggestions?

  17. Small Business social media marketing

    It’s the best time to make some plans for the future and it is time to be happy.

    I’ve read this post and if I could I desire to suggest you few interesting
    things or suggestions. Perhaps you can write next articles referring to this article.
    I desire to read more things about it!

  18. social media marketing plan

    I’ve been browsing online more than 4 hours today,
    yet I never found any interesting article like yours. It is pretty worth
    enough for me. Personally, if all website owners and bloggers made good content as you did, the web will be a lot more useful than ever before.

  19. social media in business

    Greetings, There’s no doubt that your site could possibly be having internet browser compatibility issues.
    Whenever I look at your blog in Safari, it looks fine however when opening
    in Internet Explorer, it’s got some overlapping issues. I merely wanted to give you a quick heads up!
    Aside from that, great blog!

  20. Francerodriguez.Pen.io

    I have been exploring for a little bit for any high quality articles or weblog posts on this kind of
    house . Exploring in Yahoo I eventually stumbled upon this website.
    Reading this info So i am glad to exhibit that I’ve an incredibly excellent
    uncanny feeling I came upon exactly what I needed. I so much unquestionably will make sure to do not
    forget this web site and give it a glance regularly.

Leave a Reply

Your email address will not be published. Required fields are marked *