https://github.com/eventbrite/facebook-python-sdk
Facebook Platform Python SDK
https://github.com/eventbrite/facebook-python-sdk
Last synced: 3 months ago
JSON representation
Facebook Platform Python SDK
- Host: GitHub
- URL: https://github.com/eventbrite/facebook-python-sdk
- Owner: eventbrite
- Created: 2010-08-19T16:33:43.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2024-01-12T11:16:04.000Z (over 1 year ago)
- Last Synced: 2024-01-12T23:22:34.725Z (over 1 year ago)
- Language: Python
- Homepage: http://developers.facebook.com/
- Size: 58.6 KB
- Stars: 0
- Watchers: 22
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.txt
Awesome Lists containing this project
README
Facebook Python SDK
====This client library is designed to support the
[Facebook Graph API](http://developers.facebook.com/docs/api) and the official
[Facebook JavaScript SDK](http://github.com/facebook/connect-js), which is
the canonical way to implement Facebook authentication. You can read more
about the Graph API at [http://developers.facebook.com/docs/api](http://developers.facebook.com/docs/api).Basic usage:
graph = facebook.GraphAPI(oauth_access_token)
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")
graph.put_object("me", "feed", message="I am writing on my wall!")If you are using the module within a web application with the
[JavaScript SDK](http://github.com/facebook/connect-js), you can also use the
module to use Facebook for login, parsing the cookie set by the JavaScript SDK
for logged in users. For example, in Google AppEngine, you could get the
profile of the logged in user with:user = facebook.get_user_from_cookie(self.request.cookies, key, secret)
if user:
graph = facebook.GraphAPI(user["oauth_access_token"])
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")You can see a full AppEngine example application in examples/appengine.