使用圖形API有可能做到:,我怎麼把所有的簽入一個用戶被標記使用FQL
https://graph.facebook.com/me/checkins
但是我應該如何與FQL辦呢? 我試圖this提示:
SELECT message FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND me() IN tagged_uids
,但它不返回即使一個結果。
謝謝。
使用圖形API有可能做到:,我怎麼把所有的簽入一個用戶被標記使用FQL
https://graph.facebook.com/me/checkins
但是我應該如何與FQL辦呢? 我試圖this提示:
SELECT message FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND me() IN tagged_uids
,但它不返回即使一個結果。
謝謝。
從我所看到的,IN
似乎不適用於me()
。您必須先獲取用戶標識並將其分配給一個變量。這將引發一個OAuth例外:
SELECT message FROM checkin WHERE author_uid = me() OR me() IN tagged_ids
,但如果你設置[UserId]
當前用戶的ID,這個工程:
SELECT message FROM checkin WHERE author_uid = [UserId] OR [UserId] IN tagged_ids
你並不需要使用friend
子查詢。 FQL將只返回用戶可見的簽入。
爲此,請確保您的access_token
具有user_checkins
和friends_checkins
權限。
@cpilko給了一個解決方案,但我發現一個又一個,所以我在這裏將其添加爲爲誰訪問此頁面的引用:
SELECT id FROM location_post WHERE ([UserId] IN tagged_uids OR author_uid=me()) AND strpos(type,"checkin")>=0
敢肯定它的工作原理,即使沒有friends_checkins。 – Tiger 2012-08-19 11:27:48