0

如何阅读我的朋友被标记的地方?我发现了这样的东西,但是这个例子对我不起作用。

还是我必须逐个检查

SELECT page_id, author_uid FROM location_post WHERE xxfriendIDxx IN tagged_uids  ??

{
"my_friends":"SELECT uid, name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() ORDER BY rand() LIMIT 100)",
"their_locations":"SELECT page_id, author_uid FROM location_post WHERE tagged_uids IN (SELECT uid FROM #my_friends) LIMIT 100",
"those_places": "SELECT page_id, name, location FROM page WHERE page_id IN (SELECT page_id FROM #their_locations)"
}

谢谢帮助!

4

3 回答 3

2

下面的查询将为您提供您的朋友已被标记的所有地点。

SELECT page_id, name, location FROM page WHERE page_id IN (SELECT page_id FROM location_post WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1=me()))

确保您已启用 friends_photos、friends_checkins 和 friends_status 权限。

于 2012-08-03T12:56:50.693 回答
0

their_locations在将您的子查询更改为以下内容之前,我也无法获取任何数据:

SELECT page_id, author_uid FROM location_post WHERE 
  tagged_uids IN (SELECT uid FROM #my_friends) 
    OR author_uid IN (SELECT uid FROM #my_friends) 
  LIMIT 100

它仍然没有返回一些我可以看到的带有位置标签的帖子/FRIEND_USERNAME/locations

我认识的其他朋友一直在发布带有位置标记的项目,但他们的隐私设置必须禁止这些被 API 返回。

于 2012-08-03T16:00:01.703 回答
0

你需要user_tagged_places许可。API V-4

<?php
//permissions array
     echo '<li><a href="' . $helper->getLoginUrl( array( 'user_tagged_places' ) ) . '"> Login    With Facebook</a></li>';
//call field
     echo '<pre>' . echo $graphObject['tagged_places']  . '</pre>'; 
?>
于 2014-06-04T14:44:00.113 回答