TwitterOauth: Object of class stdClass could not be converted to string

ykongbam

New Member
I have the following code (taken from actual script):\[code\]$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 />";}\[/code\]I keep getting error:\[code\]Catchable fatal error: Object of class stdClass could not be converted to string in scriptpath on line 26\[/code\]line 26 is\[code\]$apiconn = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $auth_token, $auth_token_secret);\[/code\]I don't know why this is happening, because, example from that library does the same without generating error :(.
 
Back
Top