20. API利用イメージ
(p.p.303-305)例9-5 facebook__graph_queey.py
gapi = facebook.GraphAPI(ACCESS_TOKEN)
result = gapi.request('search', {
'q' : Q,
'type' : 'group',
#略
})
groups = gapi.get_objects(group_ids, metadata=1)
Webアプリとして動く例: http://miningthesocialweb.appspot.com/
21. FQL
SQLのサブセット
select
name, sex, relationship_status より複雑な問い合わせを
from
user
したいときに使う
where
uid
in(
select
Pythonクラスで
target_id ラップして使う
from
connection
where
source_id = me() and
target_type = 'user'
)