Pyfb – A Brand New Interface To The Facebook Graph API

I Just started a new way to communicate our python applications with the Facebook Graph API.

It’s a easy to use API wrapper that provides you objects instead of dictionaries (Wich is what facebook’s API returns).

You can do cool stuff like:

from pyfb import Pyfb

#Your APP ID. You Need to register the application on facebook

facebook = Pyfb(FACEBOOK_APP_ID)

#Opens a new browser tab instance and authenticates with the facebook API
#It redirects to an url like[access_token]&expires_in=0

#Copy the [access_token] and enter it below
token = raw_input("Enter the access_token\n")

#Sets the authentication token

#Gets info about myself 
me = facebook.get_myself()

print "-" * 40
print "Name: %s" %
print "From: %s" %

print "Speaks:"
for language in me.languages:
    print "- %s" %

print "Worked at:"
for work in
    print "- %s" %

print "-" * 40

The package is available on pypi:

sudo pip install pyfb

And the code is hosted at:

I wish it was usefull for you!

Juan Manuel