Facebook auto-like

Since the NK database is still uploading (did I mention 32kB/s is slow?), my boredom has been hard to please lately. And since I despise most social-networking services, I figured I’d have some fun on facebook.

I’ve been thinking about how I can integrate FB into my current project lately. This is not going to an easy task though, mostly because the heavy amount of JS used – and I’m really bad at reverse-engineering. And since the Facebook API has been one huge mess lately (no docs, no examples, no nothing) I gave up on creating custom facebook apps.

Looking through all the application spam I am handed every day on the “Top news page” I figured I’d also join the fun. I’m not going to post tons of junk, as this would be pure spam, but liking every status of every person… is going to hand them a shitload of email notifications. Yes, that’s my way of getting back at all these farmville/mafiawars/whatever idiots.

After some time, this was born:

Note: This code doesn’t work anymore. For an updated version see: Facebook autolike II

Well, yeah, this is not the best example of good programming practise (and if you look closer some parts aren’t used anymore) – or anything close to that. BUT! it works, and here are the results after the first run:

Just for the fun of it, I also added the script as cron task to be executed every 20 minutes. Suppose I’m going to get banned for this sooner or later but… who cares, really.

In between other projects I also developed a little image hosting service. Honestly, I’m waiting for somebody to take advantage of it and get into my server somehow. Though, as long as it lasts, it’s going to serve me as personal file host, as I literally hate every second of logging into FTP when I only really want to show a picture to a friend. Oh well, you’re free to use it aswell, if you wish.


Oh, I forgot to mention – you must set your language to english!


  1. mister

    hello. how do you use that script?

  2. mister

    its python 2.6.5 right?

  3. Robus

    Yup, all you have to do is to insert your login and password
    here. Though you might have to fix the identing as wordpress messes it up ;<

  4. mister

    alright. thank you sir. (:

  5. mister

    i got a few questions more.

    1. where do i insert ({‘email’:’youremail’,’pass’:’yourpassword’,’login’:’Log+In’})?

    2. how do i load .py modules?

    im sorry, i admit i am a beginner or should i say in terms of computing i’d be the n00b. lol.

    thanks sir.

  6. mister

    okay now i’ve tried to run it a few times but there’s seems to be invalid syntax.

    “there’s an error in your program invalid syntax”

    i tried also using execfile() still it shows SyntaxError: invalid syntax.

  7. mister

    its my mistake i didnt erase “>>>”. i guess my mistakes will cover most of n00b problem. thank you sir and i appreciate this. 😀

  8. penny

    hello robert. i kinda got it working now but it doesnt seems to like any status or links or whatsoever..

    what else do i need? do i need to run firefox? do i need to logout?

  9. Robus

    Nope, the script is standalone.
    If the output looks something like this:

    Loguje sie do fejsbuka

    Then everything is fine as far as the script itself is concerned. Although, I forgot to mention: your language setting must be English for it to work.

  10. penny

    yeah it looks really like that. i even tried to translate those for the script to work. (i sounds like dumb blonde) lmao.

    anyhow, i did change from english (US) to english (UK) it still dont work. :S i even tried the english upside down. -.-‘ any tips before i give up? haha.

  11. Robus

    Well, the only suggestion I can make then is go to m.facebook.com and see if you can login, if there are any statuses shown that can “be liked” and if the site is indeed in english. Otherwise Im clueless ;<

  12. penny

    alright. i still can log in and the language is still english. and after i run python, i was logged out of facebook which indicates that python’s logged in to my account. yet i still cant see any difference.

    anyway, thanks for helping. i envy you for being able to like all the status. (i know, weird right). haha.

    i guess my journey’s over. (: thanks alot.

  13. Robus

    Being intrigued what could have gone wrong I rechecked the source – it was my mistake!
    Wordpress parsed
    url = ‘/a/like.php?%s’ % i[0].replace(‘&amp;’,’&’)
    url = ‘/a/like.php?%s’ % i[0].replace(‘&’,’&’)

    Change that in your script and it should work! Sorry for the trouble

  14. penny

    wo i thought that was the end. fortunately i refreshed this page.

    however, i did try the change. either way it still doesnt work. :S

  15. Robus

    Yup after giving you flawed code twice I now checked the reposted version myself just to be sure; it works!
    Sorry for the inconvience, I really didn’t expect wordpress to mess it up that much.

  16. penny

    mine still wont woorrrkkk. )):

  17. penny

    and it work now sweetie. hehe. thank you much. oh yeah, may i ask? what’s the thing about timer you said? i mean, every 20 minutes something. what is that? is this script automated?

  18. Robus


    It’s a utility to run programs periodically on *nix systems. You’ll have to setup a scheduled task (windows) or run the script manually if you want to “like” all the new statuses appearing.

  19. I really like what you post here, very fresh and intelligent. One issue though, I’m running Firefox on Debian and parts of your layout pieces are a little broken. I realize it’s not a popular setup, but it is still something to watch out for. Just shooting you a heads up.

Comments are closed, but trackbacks and pingbacks are open.