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