pip install facebook-sdk
python
import facebook
app_id = 'YOUR_APP_ID'
app_secret = 'YOUR_APP_SECRET'
access_token = 'YOUR_ACCESS_TOKEN'
api = facebook.GraphAPI(access_token=access_token)
python
user = api.get_object('me')
print(user)
python
post = api.put_object(parent_object='me', connection_name='feed', message='Hello, Facebook!')
print(post)
python
friends = api.get_connections(id='me', connection_name='friends')
print(friends)