问题
I want to retrieve all the links shared on my wall using graph/fql, is there a way to get these
I am using fql query using friend list but that is not working, taking too long to respond.
回答1:
In addition to genesis' post, you may want to look for links in messages as links posted directly as statuses on your wall do not have a 'link' field. You will have to extract the links yourself however which may require knowledge of regex or blind trust of solutions posted here.
回答2:
<?php
$json = (array) json_decode(file_get_contents("https://graph.facebook.com/me/feed/?access_token=".$access_token_here));
foreach($json['data'] as $item){
if ($item->link){
$links[] = $item->link;
}
}
print_r($links);
returns
Array
(
[0] => http://youtu.be/r0a-o16i_Gw
)
回答3:
The Graph API Explorer is a good place to look for these. You want /me/links to access the Link object. You'll need an access_token from an authorized user who has granted the read_stream permission.
来源:https://stackoverflow.com/questions/7179944/get-shared-links-on-facebook-newsfeed