我正在创建一个 Facebook 应用程序。我正在尝试发布用户墙。但我没有得到任何回应
php代码
$user = $facebook->getUser();
if($user == 0) {
$login_url = $facebook->getLoginUrl($params = array('scope' => "publish_stream"));
echo ("<script> top.location.href='".$login_url."'</script>");
} else { $token=$facebook->getAccessToken();
try {
params = array(
'message' => "Hurray! This works :)",
'name' => "This is my title",
'caption' => "My Caption",
'description' => "Some Description...",
'link' => "http://stackoverflow.com",
'picture' => "http://i.imgur.com/VUBz8.png",
);
$post = $facebook->api("/me/feed","POST",$params);
}
catch (FacebookApiException $e) {
$result = $e->getResult();
}
}
我无法将内容发布到用户的墙上。请帮助我调试代码