pyfb

pyfb

Released 6 years ago , Last update 6 years ago

A Python Interface to the FaceBook Graph API

This is an Easy to Use Python Interface to the Facebook Graph API

It gives you methods to access your data on facebook and provides objects instead of json dictionaries!

Here's a little example to access your facebook profile data

from pyfb import Pyfb

#Your APP ID. You Need to register the application on facebook
#http://developers.facebook.com/
FACEBOOK_APP_ID = 'YOUR_APP_ID'

facebook = Pyfb(FACEBOOK_APP_ID)

#Opens a new browser tab instance and authenticates with the facebook API
#It redirects to an url like       http://www.facebook.com/connect/login_success.html#access_token=   [access_token]&expires_in=0
 facebook.authenticate()

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

#Sets the authentication token
facebook.set_access_token(token)

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

print "-" * 40
print "Name: %s" % me.name
print "From: %s" % me.hometown.name
print 

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

print     
print "Worked at:"
for work in me.work:
    print "- %s" % work.employer.name

print "-" * 40

Read about Django Integration and more...

The Package is also available on pypi:

sudo pip install pyfb
4.0
  • 5 0
  • 4 1
  • 3 0
  • 2 0
  • 1 0
1 Reviews Read Reviews

Pricing

FREE

Personal License

  • Perpetual license

  • Unlimited sites, servers

  • No distribution (hosted use only)

  • Commercial use

License » Personal License Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
No comments have been posted yet.