views:

193

answers:

2

I want to make a script that can be used to send messages to our friends on facebook. How do I proceed? Which is the best module to use?

A: 

PyFacebook is a Python client library for the Facebook API.

BioGeek
+1  A: 

You may indeed want pyfacebook as another answer suggested, though the URL I'm giving (on googlecode.com) is where the project (esp. its source;-) actually lives.

A simple survey of Python APIs for facebook is here, and it also points to a possibly-simpler but less complete API, if you want to run in Google App Engine, i.e., simplefacebook. pyfacebook does not limit you to App Engine specifically, though it can support it of course.

A pyfacebook tutorial is here -- it even briefly shows how to use it from an interactive interpreter (!), though the bulk of the tutorial is about doing web apps, of course.

Alex Martelli
I just wanna confirm that can i send Personal Messages using that?
shadyabhi
@Shadyabhi, looks like you can, within all Facebook policy constraints of course, cfr e.g. http://wiki.developers.facebook.com/index.php/Notes.create (user must grant `create_note` extended permission).
Alex Martelli