我正在使用facebook API
https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN
它不会从我的朋友在我的墙上分享的图片,视频等新闻Feed中获取所有内容,我在其中标记了帖子。怎么做?
答案 0 :(得分:1)
您需要将正确的GET变量提供给Graph Api,如下所示:
734778xxx?fields=id,name,photos.fields(images,icon),email,posts.fields(comments.fields(message))
转到此页面并自行测试 https://developers.facebook.com/tools/explorer
如果您需要单独的令牌,您可以构建类似的内容,
<?php
require_once("facebook.php");//download & more info here https://developers.facebook.com/docs/reference/php/
$config = array(
'appId' => FBAPPID,
'secret' => FBAPPSECRET,
);
$facebook = new Facebook($config);
$fbuserid = $facebook->getUser();
$params = array(
"scope" => "read_stream,email,user_about_me", //here you ask for the parameters you need
"redirect_uri" => "http://www.yoursite.com/"
);
//getting the info
$user_profile = $facebook->api('/me','GET');
$fname = $user_profile["first_name"];
$lname = $user_profile["last_name"];
$email = $user_profile["email"];
?>