0
从墙上的照片和视频,我使用Facebook的API如何给使用Facebook的API
https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN
它不取出由新闻提要像画面中的所有内容,由我的朋友在我的墙上分享的视频,我被标记的帖子。怎么做?
从墙上的照片和视频,我使用Facebook的API如何给使用Facebook的API
https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN
它不取出由新闻提要像画面中的所有内容,由我的朋友在我的墙上分享的视频,我被标记的帖子。怎么做?
你需要给正确的GET变量的图形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"];
?>
谢谢,罗恩,它的工作原理和我非常接近,但它需要个人令牌。我认为个人令牌会过期过了一段时间,我该如何在运行时生成它。 – donstack
标记答案为接受答案plz ... – RonEskinder