0

我正在使用 Facebook API

https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN

它不会从新闻提要中获取所有内容,例如图片、朋友在我的墙上分享的视频、我被标记的帖子。怎么做?

4

1 回答 1

1

您需要为 Graph Api 提供正确的 GET 变量,如下所示:

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"];

?>
于 2013-03-31T06:09:55.827 回答