1
我有一个PHP文件,删除推文。我想从它得到“http_code”,但没有任何工作。这里是我的代码:?如何阅读Twitter JSON?
<?php
require_once('/twitter_files/twitteroauth/twitteroauth.php');
require_once('/twitter_files/config.php');
$oauth_token = "****";
$oauth_token_secret = "****";
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $oauth_token, $oauth_token_secret);
$content = $connection->delete('statuses/destroy/49628236694556672');
print_r($connection);
>
随着该print_r的,我得到一个非常长的阵列,由于某种原因,我不能阅读。这里有一个片段:
TwitterOAuth Object ([http_code] => 404
我该如何阅读它?我试过json_decode,但我得到错误。
在此先感谢!
愚蠢的我。谢谢。 – iosfreak 2011-03-21 01:19:12