salman_ahad@yahoo.com 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; Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.