Problem with frends/ids


#1

hi,
sorry for my bad english i’m a youg french developper
I use the library twitterorauth but i have a problem : This php code (for print the text of a private message) works with any problem :
$connection = new TwitterOAuth(‘hidden’, ‘hiden’, $_SESSION[‘def_oauth_token’], $_SESSION[‘def_oauth_token_secret’]);
print 'Connecté en tant que '.$_SESSION[‘screen_name’];
print ‘

’;
print ‘



’;

        $test = $connection->get('direct_messages');
        echo $test[1]->text;

But this code doesn’t work :
$connection = new TwitterOAuth(‘hidden’, ‘hiden’, $_SESSION[‘def_oauth_token’], $_SESSION[‘def_oauth_token_secret’]);
print 'Connecté en tant que '.$_SESSION[‘screen_name’];
print ‘

’;
print ‘



’;

        $test = $connection->get('friends/ids');
        echo $test[1]->text;

Why it works for direct_message and not for friends/ids ?
Thanks for helping me.
Cordialy Lucas.


#2

up


#3

up


#4

i did a print_r($test); i i get this : stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Bad Authentication data [code] => 215 ) ) )
Why it works with direct_message and not with firends/ids ?