使用GRAPH API访问用户朋友的工作历史记录 [英] Accessing users friends work history using GRAPH API

查看:88
本文介绍了使用GRAPH API访问用户朋友的工作历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我弄清楚了如何使用图形API访问用户的朋友列表:

So I figured how to access a user's friends list using the graph API:

<?php
if($user_id) {

  try {
        $friends = $facebook->api("/me/friends/work_history");
    }
    catch(Exception $o){
        d($o);
    }
}
?>

如果我摆脱了work_history,它将通过回显$friends返回一个朋友列表.如果我将work_history保留在那里,它将仅返回一个空白数据数组.我已通过测试用户授予访问朋友工作记录的权限,但没有任何回报.

If I get rid of work_history it will return a list of friends by echoing $friends. If I keep work_history there it just returns a blank data array. I've granted permissions via the test user to access friends work history but nothing returns.

如何访问测试用户朋友的工作历史记录列表?

How do I access a list of the test users friends work history?

推荐答案

通过访问以下URL来指定您想要工作字段:

Specify that you want the work field by accessing this url:

https://graph.facebook. com/me/friends?fields = id,名称,工作和access_token = ...

这篇关于使用GRAPH API访问用户朋友的工作历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆