Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Facebook makes it even easier to interact with Facebook's Graph API
Python Ruby
Tree: 9e20b8d3ff

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
facebook
tests
.gitignore
Guardfile
HISTORY.rst
LICENSE
MANIFEST
MANIFEST.in
Makefile
README.rst
setup.py

README.rst

Facebook

About

Facebook makes it even easier to interact with Facebook's Graph API.

Usage

import facebook

# Query Facebook anonymously
user = facebook.User('johannes.gorset')

user.facebook_id    # => 586052336
user.first_name     # => 'Johannes'
user.last_name      # => 'Gorset'
user.name           # => 'Johannes Gorset'
user.link           # => 'http://facebook.com/johannesgorset'

# Query Facebook on behalf of a user
with facebook.session(oauth_token) as session:
    user = session.User('johannes.gorset')

    user.permissions    # => ['user_location', 'user_relationships']
    user.friends        # => [<User #586052345>, <User #556022345>, <User #586252349>, ...]

Disclaimer

I'm not nearly done yet.

Installation

$ pip install facebook

I love you

Johannes Gorset made this. You should tweet me if you can't get it to work. In fact, you should tweet me anyway.

Something went wrong with that request. Please try again.