0
我有以下代碼(從實際腳本獲取):TwitterOAuth對象:類stdClass的的對象無法轉換爲字符串
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result))
{
$auth_token=$row['oauth_token'];
$auth_token_secret=$row['oauth_token_secret'];
$apiconn = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $auth_token, $auth_token_secret);
$API_result = $apiconn->post('friendships/create', array('screen_name' => $uname));
echo $API_result . "<br />";
}
我不斷收到錯誤:
Catchable fatal error: Object of class stdClass could not be converted to string in scriptpath on line 26
線26
$apiconn = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $auth_token, $auth_token_secret);
我不知道爲什麼會發生這種情況,因爲從that library的例子也一樣出生成錯誤:(。
是的,它錯誤地計算出PHP計數行:( – ariefbayu 2010-09-18 23:27:26