所以我想到了如何使用图形 API 访问用户的好友列表:
<?php
if($user_id) {
try {
$friends = $facebook->api("/me/friends/work_history");
}
catch(Exception $o){
d($o);
}
}
?>
如果我去掉 work_history
,它将通过回显 $friends
返回 friend 列表。如果我将 work_history
放在那里,它只会返回一个空白数据数组。我已通过测试用户授予访问 friend 工作历史记录的权限,但没有任何返回。
如何访问测试用户好友工作历史列表?
最佳答案
通过访问此 url 指定您想要工作字段:
https://graph.facebook.com/me/friends?fields=id,name,work&access_token=...
关于facebook-graph-api - 使用 GRAPH API 访问用户 friend 的工作历史,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8190231/