我正在尝试从me/feed
喜欢这个
if ($user) {
try {
$user_profile = $facebook->api('/me');
$friends = $facebook->api('/me/friends');
$feeds = $facebook->api('/me/feed',
array (
'with' => 'location',
));
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
当我打印它时,它给了我整个Feed,而不仅仅是像API这样的帖子说它会...... Docs Here
print_r($facebook->api('/me/feed'));
这是我的代码。
<?php
require 'facebookAPI/src/facebook.php';
$facebook = new Facebook(array(
'appId' => '0000000',
'secret' => '000000000',
));
$user = $facebook->getUser();
if ($user) {
try {
$user_profile = $facebook->api('/me');
$friends = $facebook->api('/me/friends');
$feeds = $facebook->api('/me/feed',
array (
'with' => 'location',
));
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
if ($user) {
$params = array( 'next' => 'http://www.wuno.com/sandbox/actions/fbLogout.php' );
$logoutUrl = $facebook->getLogoutUrl($params);
} else {
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'user_about_me, user_checkins, friends_checkins, user_location, friends_location, read_stream')
);
}
?>