Contenu connexe Similaire à Facebook fql and tweepy (20) Plus de DaeMyung Kang (20) Facebook fql and tweepy2. Facebook Graph API(Json)
http://developers.facebook.com/docs/reference/api/
{
"name": "Facebook Platform",
"type": "page",
"website": "http://developers.facebook.com",
"username": "platform",
"founded": "May 2007",
"company_overview": "Facebook Platform enables anyone to build...",
"mission": "To make the web more open and social.",
"products": "Facebook Application Programming Interface (API)...",
"likes": 449921,
"id": 19292868552,
"category":
"Technology"
}
3. FQL = Facebook Query Language
http://developers.facebook.com/docs/reference/fql/
10. .fbconsole.py Sample
from urllib import urlretrieve
import imp
urlretrieve('https://raw.github.com/gist/1194123/fbconsole.py', '.fbconsole.py')
fb = imp.load_source('fb', '.fbconsole.py')
fb.AUTH_SCOPE = ['read_stream']
fb.authenticate()
comments = fb.fql(
"SELECT post_id, actor_id, target_id, message, comments FROM stream WHERE filter_key in
(SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND is_hidden =
0 LIMIT 1“
)
print comments
11. .fbconsole.py Result(JSON)
[{u'post_id': u'100001220342847_269268529764053', u'message': u'uc81cuac00
uc911ud559uc0dd ub54c uac10ub3d9 ubc1buc73cuba74uc11c ud588ub358
uac8cuc784..nuc9c0uae08ub3c4 uac8cuc784 uad00ub828 uc77c
ud558uba74uc11c ub2f9uc2e0uc774 uac00uc7a5 uac10uba85uae4auac8c ud55c
uac8cuc784uc774 ubb34uc5c7uc785ub2c8uae4c?nub77cuace0
ubb3cuc5b4ubcfc ub54c uc8fcuc800 uc5c6uc774 ub300ub2f5ud558ub294
uac8cuc784..nnhttp://itunes.apple.com/us/app/another-world-20th-
anniversary/id460076328?mt=8nnuc5b4ub098ub354uc6d4ub4dcuac00 20uc8fcub144
uae30ub150ud310uc774 ub098uc654ub124uc694, uceacud558ud558 ^^', u'target_id':
None, u'actor_id': 100001220342847, u'comments': {u'count': 1, u'comment_list': [{u'text':
u'uc774uac74 uadf8ub798ud53d uc5ecubd80ub97c ub5a0ub098uc11c uaf2d
uc5d4ub529uc744 ubd10uc57c ub428..', u'likes': 0, u'time': 1316830670, u'fromid':
100001220342847, u'id': u'100001220342847_269268529764053_3910464', u'user_likes': False}],
u'can_remove': False, u'can_post': True}}]
19. Support API List For Timeline
http://code.google.com/p/tweepy/wiki/APIReference
Timeline
Public_timeline Returns the 20 most recent public statuses
Home_timeline Returns the statuses of user and friends with retweets
Friends_timeline Returns the statuses of user and friends
User_timeline Returns the statuses of the user
Mentions Returns the mentions of the user
Retweeted_by_me Returns the retweets posted by the user
Retweeted_to_me Returns the retweets posted by the user's friends
Retweets_of_me Returns the tweets of the authenticated user that have been retweeted
by others