python
import facebook
import pandas as pd
import json
python
access_token = 'YOUR_ACCESS_TOKEN'
graph = facebook.GraphAPI(access_token)
python
user = graph.get_object('me')
print(json.dumps(user, indent=4))
python
posts = graph.get_connections('me', 'posts')
print(json.dumps(posts, indent=4))
python
friends = graph.get_connections('me', 'friends')
print(json.dumps(friends, indent=4))
python
page_id = 'YOUR_PAGE_ID'
posts = graph.get_connections(page_id, 'posts')
print(json.dumps(posts, indent=4))