我有这段代码:-
<?php
$xml = file_get_contents("http://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,%20commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url='http://www.facebook.com/nokia'");
echo $xml;
$obj = json_decode($xml);
print $obj;
print $obj->{'like_count'};
?>
它给了我以下错误: -
{"data":[{"url":"http:\/\/www.facebook.com\/nokia","normalized_url":"http:\/\/www.facebook.com\/nokia","share_count":1240,"like_count":8622663,"comment_count":287,"total_count":8624190,"commentsbox_count":2,"comments_fbid":404897301238,"click_count":10}]}
Catchable fatal error: Object of class stdClass could not be converted to string in C:\xampp\htdocs\nokia_app\test.php on line 5
我怎样才能纠正它?