[email protected] Posted December 6, 2009 Share Posted December 6, 2009 I am trying to retrieve information from this JSON API, getting this error Catchable fatal error: Object of class stdClass could not be converted to string My code $json = file_get_contents('http://api.tweetmeme.com/url_info.json?url=http://is.gd/lznv'); $data = json_decode($json); echo $data; Link to comment https://forums.phpfreaks.com/topic/184138-catchable-fatal-error/ Share on other sites More sharing options...
trq Posted December 6, 2009 Share Posted December 6, 2009 You cannot echo an object. Try... var_dump($data); If you just want to see what the object contains. Link to comment https://forums.phpfreaks.com/topic/184138-catchable-fatal-error/#findComment-972226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.