What is libpurple?

Libpurple picture

Okay, so starting things off, what the heck is libpurple??

If you google a definition for libpurple, you’ll get something like, “Pidgin (formerly named Gaim) is a multi-platform instant messaging client, based on a library named libpurple.”

So basically, libpurple is a programming interface for instant messaging over various networks (such as AIM, Yahoo, MSN, ICQ, etc.). Pidgin, on the other hand, is an instant messaging application that uses libpurple and includes a GUI (graphical user interface) for all us normal people out there.

What can you do with libpurple, you ask? Lots of nifty stuff.

Since libpurple is essentially an API, pretty much anything your instant messenger can do, you can do programmatically using libpurple. Want to make your own IM robot? Go ahead! I’ll show you how.

Does it require anything special?

All you need is an installation of libpurple on whatever system it’s going to run on and an IM account on pretty much any network, and that’s about it. (And you don’t need to register your IM account as a bot). Since libpurple is written in C, your programs will have to be written in C as well. If you’re not a pro in C, don’t panic. I never used C a day in my life until I wrote an instant messaging program using libpurple. Fortunately, libpurple is pretty easy to understand once you get the hang of it. Trust me on this one.

Since I am mostly a web developer, I am going to show you how to create and run IM programs on a Linux server over the command line. If you are a light web developer with your own website, but you don’t have access to the command line on your server (say, if you have a shared web server…), you’re going to need either a virtual private server or a dedicated server OR if you have just any old computer laying around, you can use that too! All you need is administrative access on that computer/server.

Who uses libpurple?

Probably one of the most notable applications of libpurple on the web is meebo.com. They provide a web-based instant messaging service for several different networks, including Facebook Chat (yes, you can do Facbeook Chat too). For a full list of who uses libpurple, you can go here.

Who created libpurple?

Not me! Sorry to disappoint you. It was actually made by these guys http://pidgin.im/. I just use libpurple for real world applications over the web. I’m just a normal guy, not a pro in libpurple, but I have learned many things the hard way because of such little documentation on this. If you go searching for tutorials on how to use libpurple, this is about the best you’ll find:

Your application will first initialize the core (purple_core_init), add plugin-search paths, load the saved plugins, prefs etc. Your best bet is to check out a copy of the source code and look at finch/finch.c:init_libpurple().

(stright from the Pidgin website)

As you can see, not very helpful…so that’s why I’m here, to contribute what I wish I had a looong time ago.

Next up: Tutorials!

  1. Thanks for sharing these useful information! Hope that you will continue doing nice article like this. I will be one of your loyal reader if you maintain this kind of post!

  2. Your website is very helpful. Say thanks to you so some for a nifty turn of priceless resources. Most definitely i’ll bookmark your blogging site and faculty be most definitely regressive. All over again, I regard your energy and intercourse a lot of omnipotent information for the people.

  3. +1 on that

  4. Thanks for that helpful post I will boomark this. Keep up the good work. Goodbye

  5. This is my first time i visit here. I found so many useful stuff in your website especially its discussion. From the a lot of comments on your articles, I guess Im not the only one receiving the many satisfaction right here! keep up a good job.

  6. Hi very good article thanks for sharing with us and also very good blog!!!
    Trakcmobile, Rail King Mexico, Shuttlewagon, Remolcador Ferroviario
    yakima photographer

  7. Wow, marvelous blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is wonderful, as well as the content!

  8. thanks for information.i just emailed this article to my friends! thanks!

  9. Your blog could have been more comments if you put it on Facebook page using iframe. I found the link that will put your whole Wordpress website within Facebook

  10. It is great whenever i stumble on a really great publish such as it. Finding a bit drained with the bad quality posts a couple of bloggers be able to write on their weblogs. Keep it up. You now possess a normal visitor now!

  11. Wow! This could be one particular of the most useful blogs We’ve ever arrive across on this subject. Actually Fantastic. I’m also a specialist in this topic so I can understand your hard work.

  12. good idea
    i like that
    perfect
    i can’t understand please re-write for me basic eng.
    woavv supper!! i like it
    thank you, i search it about one week

  13. It’s appropriate time to make some plans for the future and it is time to be happy. I have read this post and if I could I want to suggest you some interesting things or tips. Perhaps you can write next articles referring to this article. I wish to read even more things about it!

  14. Maybe you’d have more fun searching for someone on an online dating site.

  15. Site concept and sharing are quality thank you.

*