際際滷

際際滷Share a Scribd company logo
Facebook FQL And Tweepy



             charsyam@naver.com
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"
 }
FQL = Facebook Query Language
http://developers.facebook.com/docs/reference/fql/
FQL = Facebook Query Language
         SQL like
         Easy to Use Graph API
SELECT status_id,message,TIME,SOURCE FROM
`status` WHERE uid = me()


                                Login User Unique ID
                                112345667889
Expression
SELECT [Field] FROM [Table] WHERE [conditions]
Expression
SELECT [Field] FROM [Table] WHERE [conditions]
SELECT [Field] FROM [Table]  Error

Limitation
Alawys Need Condtions Field
Expression
SELECT link_id, owner, owner_comment, created_time, title,
summary, url, image_urls FROM link WHERE link_id =
114961875194024
.fbconsole.py
https://raw.github.com/gist/1194123/fbconsole.py


Python Facebook Library
.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
.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}}]
But, Facebook supports partial
     Cant get Recent Activity
tweepy
http://code.google.com/p/tweepy/


Python Twitter Library
tweepy Sample
import tweepy

public_tweets = tweepy.api.public_timeline()
for tweet in public_tweets:
   print tweet.text
Need Twitter Access Token
    For OAuth
Go https://dev.twitter.com/apps
Create Twitter Access Token
Create Twitter Access Token
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
DEMO
Q&A
Thank you!

More Related Content

Similar to Facebook fql and tweepy (20)

Facebook's Apps II part
Facebook's Apps II partFacebook's Apps II part
Facebook's Apps II part
Felix Rivas
Facebook and its development
Facebook and its developmentFacebook and its development
Facebook and its development
Tao Wang
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
markandey
FOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy AppliedFOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy Applied
removed_90b14f0ccacc165c72857a08cfe7f775
Yahoo - Open Applied
Yahoo - Open AppliedYahoo - Open Applied
Yahoo - Open Applied
Carsonified Team
Seti 09
Seti 09Seti 09
Seti 09
bzanchet
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Send.php
Send.phpSend.php
Send.php
abdoahmd44
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docxVersion1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
washingtonrosy
Test upload
Test uploadTest upload
Test upload
Darrell Lawson Jr.
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
FQL Overview
FQL OverviewFQL Overview
FQL Overview
Craig Saila
H3 蟆曙レ 轟 螳覦 覈覦 js
H3 蟆曙レ 轟 螳覦  覈覦 js H3 蟆曙レ 轟 螳覦  覈覦 js
H3 蟆曙レ 轟 螳覦 覈覦 js
覩狩 蟾
Web services and JavaScript
Web services and JavaScriptWeb services and JavaScript
Web services and JavaScript
Christian Heilmann
Facebook Platform
Facebook PlatformFacebook Platform
Facebook Platform
David Nattriss
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQuery
Doncho Minkov
StirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with SailsStirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with Sails
Justin James
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
Saurabh Sahni
Playing With The Web
Playing With The WebPlaying With The Web
Playing With The Web
Christian Heilmann
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slidesDEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
Felipe Prado
Facebook's Apps II part
Facebook's Apps II partFacebook's Apps II part
Facebook's Apps II part
Felix Rivas
Facebook and its development
Facebook and its developmentFacebook and its development
Facebook and its development
Tao Wang
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
markandey
Seti 09
Seti 09Seti 09
Seti 09
bzanchet
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docxVersion1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
Version1.0 StartHTML000000227 EndHTML000034516 StartFragment0000.docx
washingtonrosy
H3 蟆曙レ 轟 螳覦 覈覦 js
H3 蟆曙レ 轟 螳覦  覈覦 js H3 蟆曙レ 轟 螳覦  覈覦 js
H3 蟆曙レ 轟 螳覦 覈覦 js
覩狩 蟾
Web services and JavaScript
Web services and JavaScriptWeb services and JavaScript
Web services and JavaScript
Christian Heilmann
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQuery
Doncho Minkov
StirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with SailsStirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with Sails
Justin James
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
Saurabh Sahni
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slidesDEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
DEF CON 27 - workshop - JOSH REYNOLDS - from ek to dek slides
Felipe Prado

More from DaeMyung Kang (20)

Count min sketch
Count min sketchCount min sketch
Count min sketch
DaeMyung Kang
Redis
RedisRedis
Redis
DaeMyung Kang
Ansible
AnsibleAnsible
Ansible
DaeMyung Kang
Why GUID is needed
Why GUID is neededWhy GUID is needed
Why GUID is needed
DaeMyung Kang
How to use redis well
How to use redis wellHow to use redis well
How to use redis well
DaeMyung Kang
The easiest consistent hashing
The easiest consistent hashingThe easiest consistent hashing
The easiest consistent hashing
DaeMyung Kang
How to name a cache key
How to name a cache keyHow to name a cache key
How to name a cache key
DaeMyung Kang
Integration between Filebeat and logstash
Integration between Filebeat and logstash Integration between Filebeat and logstash
Integration between Filebeat and logstash
DaeMyung Kang
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
DaeMyung Kang
Massive service basic
Massive service basicMassive service basic
Massive service basic
DaeMyung Kang
Data Engineering 101
Data Engineering 101Data Engineering 101
Data Engineering 101
DaeMyung Kang
How To Become Better Engineer
How To Become Better EngineerHow To Become Better Engineer
How To Become Better Engineer
DaeMyung Kang
Kafka timestamp offset_final
Kafka timestamp offset_finalKafka timestamp offset_final
Kafka timestamp offset_final
DaeMyung Kang
Kafka timestamp offset
Kafka timestamp offsetKafka timestamp offset
Kafka timestamp offset
DaeMyung Kang
Data pipeline and data lake
Data pipeline and data lakeData pipeline and data lake
Data pipeline and data lake
DaeMyung Kang
Redis acl
Redis aclRedis acl
Redis acl
DaeMyung Kang
Coffee store
Coffee storeCoffee store
Coffee store
DaeMyung Kang
Scalable webservice
Scalable webserviceScalable webservice
Scalable webservice
DaeMyung Kang
Number system
Number systemNumber system
Number system
DaeMyung Kang
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang
Why GUID is needed
Why GUID is neededWhy GUID is needed
Why GUID is needed
DaeMyung Kang
How to use redis well
How to use redis wellHow to use redis well
How to use redis well
DaeMyung Kang
The easiest consistent hashing
The easiest consistent hashingThe easiest consistent hashing
The easiest consistent hashing
DaeMyung Kang
How to name a cache key
How to name a cache keyHow to name a cache key
How to name a cache key
DaeMyung Kang
Integration between Filebeat and logstash
Integration between Filebeat and logstash Integration between Filebeat and logstash
Integration between Filebeat and logstash
DaeMyung Kang
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
DaeMyung Kang
Massive service basic
Massive service basicMassive service basic
Massive service basic
DaeMyung Kang
Data Engineering 101
Data Engineering 101Data Engineering 101
Data Engineering 101
DaeMyung Kang
How To Become Better Engineer
How To Become Better EngineerHow To Become Better Engineer
How To Become Better Engineer
DaeMyung Kang
Kafka timestamp offset_final
Kafka timestamp offset_finalKafka timestamp offset_final
Kafka timestamp offset_final
DaeMyung Kang
Kafka timestamp offset
Kafka timestamp offsetKafka timestamp offset
Kafka timestamp offset
DaeMyung Kang
Data pipeline and data lake
Data pipeline and data lakeData pipeline and data lake
Data pipeline and data lake
DaeMyung Kang
Scalable webservice
Scalable webserviceScalable webservice
Scalable webservice
DaeMyung Kang
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang

Recently uploaded (20)

DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAMDUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
vlckovar
Mate, a short story by Kate Grenville.pptx
Mate, a short story by Kate Grenville.pptxMate, a short story by Kate Grenville.pptx
Mate, a short story by Kate Grenville.pptx
Liny Jenifer
TPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategyTPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategy
Henry Tapper
How to attach file using upload button Odoo 18
How to attach file using upload button Odoo 18How to attach file using upload button Odoo 18
How to attach file using upload button Odoo 18
Celine George
N.C. DPI's 2023 Language Diversity Briefing
N.C. DPI's 2023 Language Diversity BriefingN.C. DPI's 2023 Language Diversity Briefing
N.C. DPI's 2023 Language Diversity Briefing
Mebane Rash
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
Adventure Activities Final By H R Gohil Sir
Adventure Activities Final By H R Gohil SirAdventure Activities Final By H R Gohil Sir
Adventure Activities Final By H R Gohil Sir
GUJARATCOMMERCECOLLE
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir DotanThe Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
History of Stoke Newington
Kaun TALHA quiz Finals -- El Dorado 2025
Kaun TALHA quiz Finals -- El Dorado 2025Kaun TALHA quiz Finals -- El Dorado 2025
Kaun TALHA quiz Finals -- El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
cervical spine mobilization manual therapy .pdf
cervical spine mobilization manual therapy .pdfcervical spine mobilization manual therapy .pdf
cervical spine mobilization manual therapy .pdf
SamarHosni3
PUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health SystemsPUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health Systems
Jonathan Hallett
Digital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptxDigital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptx
Dr. Sarita Anand
Essentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok SonawalaEssentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok Sonawala
Association for Project Management
CBSE Arabic Grammar - Class 10 ppt.pptx
CBSE Arabic Grammar - Class 10   ppt.pptxCBSE Arabic Grammar - Class 10   ppt.pptx
CBSE Arabic Grammar - Class 10 ppt.pptx
suhail849886
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
The Broccoli Dog's inner voice (look A)
The Broccoli Dog's inner voice  (look A)The Broccoli Dog's inner voice  (look A)
The Broccoli Dog's inner voice (look A)
merasan
Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
How to Configure Restaurants in Odoo 17 Point of Sale
How to Configure Restaurants in Odoo 17 Point of SaleHow to Configure Restaurants in Odoo 17 Point of Sale
How to Configure Restaurants in Odoo 17 Point of Sale
Celine George
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
Association for Project Management
DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAMDUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
DUBLIN PROGRAM DUBLIN PROGRAM DUBLIN PROGRAM
vlckovar
Mate, a short story by Kate Grenville.pptx
Mate, a short story by Kate Grenville.pptxMate, a short story by Kate Grenville.pptx
Mate, a short story by Kate Grenville.pptx
Liny Jenifer
TPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategyTPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategy
Henry Tapper
How to attach file using upload button Odoo 18
How to attach file using upload button Odoo 18How to attach file using upload button Odoo 18
How to attach file using upload button Odoo 18
Celine George
N.C. DPI's 2023 Language Diversity Briefing
N.C. DPI's 2023 Language Diversity BriefingN.C. DPI's 2023 Language Diversity Briefing
N.C. DPI's 2023 Language Diversity Briefing
Mebane Rash
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
Adventure Activities Final By H R Gohil Sir
Adventure Activities Final By H R Gohil SirAdventure Activities Final By H R Gohil Sir
Adventure Activities Final By H R Gohil Sir
GUJARATCOMMERCECOLLE
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir DotanThe Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
History of Stoke Newington
cervical spine mobilization manual therapy .pdf
cervical spine mobilization manual therapy .pdfcervical spine mobilization manual therapy .pdf
cervical spine mobilization manual therapy .pdf
SamarHosni3
PUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health SystemsPUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health Systems
Jonathan Hallett
Digital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptxDigital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptx
Dr. Sarita Anand
CBSE Arabic Grammar - Class 10 ppt.pptx
CBSE Arabic Grammar - Class 10   ppt.pptxCBSE Arabic Grammar - Class 10   ppt.pptx
CBSE Arabic Grammar - Class 10 ppt.pptx
suhail849886
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
The Broccoli Dog's inner voice (look A)
The Broccoli Dog's inner voice  (look A)The Broccoli Dog's inner voice  (look A)
The Broccoli Dog's inner voice (look A)
merasan
Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
How to Configure Restaurants in Odoo 17 Point of Sale
How to Configure Restaurants in Odoo 17 Point of SaleHow to Configure Restaurants in Odoo 17 Point of Sale
How to Configure Restaurants in Odoo 17 Point of Sale
Celine George
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
Association for Project Management

Facebook fql and tweepy

  • 1. Facebook FQL And Tweepy charsyam@naver.com
  • 2. 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/
  • 4. FQL = Facebook Query Language SQL like Easy to Use Graph API
  • 5. SELECT status_id,message,TIME,SOURCE FROM `status` WHERE uid = me() Login User Unique ID 112345667889
  • 6. Expression SELECT [Field] FROM [Table] WHERE [conditions]
  • 7. Expression SELECT [Field] FROM [Table] WHERE [conditions] SELECT [Field] FROM [Table] Error Limitation Alawys Need Condtions Field
  • 8. Expression SELECT link_id, owner, owner_comment, created_time, title, summary, url, image_urls FROM link WHERE link_id = 114961875194024
  • 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}}]
  • 12. But, Facebook supports partial Cant get Recent Activity
  • 14. tweepy Sample import tweepy public_tweets = tweepy.api.public_timeline() for tweet in public_tweets: print tweet.text
  • 15. Need Twitter Access Token For OAuth
  • 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
  • 20. DEMO
  • 21. Q&A