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);
}
}
?>
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?
Specify that you want the work field by accessing this url:
https://graph.facebook.com/me/friends?fields=id,name,work&access_token=…