1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Invite all friends to like page jQuery code

Discussion in 'FaceBook' started by meaculpa, Jun 14, 2014.

  1. meaculpa

    meaculpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 27, 2008
    Messages:
    710
    Likes Received:
    336
    Occupation:
    SEO
    Location:
    Netherlands
    Hey guys,

    Here's a quick piece of code I used to invite all my friends to like my Facebook page. You need to force jQuery onto the page which can be done in multiple ways. I would suggest installing the jQuerify extension on Chrome but you can use simple Javascript to do it as well.

    You have to go to your page to use the code. It'll invite all the friends by clicking the invite button in the side colom so this doesn't work on the lightbox version of that page (does that still exist? I couldn't find it.) Make sure you click 'see all friends' and then scroll all the way down in that box. It shouldn't always be necessary but it can't hurt either so I'd just do it. Anyway, here's the code:

    HTML:
    $("button._42ft._4jy0._4jy3._517h[type='submit']").each(function (){
      $(this).click();
    });
    
    GLHF,
    Mea
     
    • Thanks Thanks x 1
    Last edited: Jun 14, 2014