You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am sorry if it's a stupid question, but do I need to call "new TwitterAPIExchange($settings)" before every API request ?
ie :
Do I have to do : $API = new TwitterAPIExchange($settings);
$result1 = json_decode( $API->setGetfield( "?user_id=1015908282&tweet_mode=extended&exclude_replies=true&include_rts=1&count=200" )
->buildOauth( "https://api.twitter.com/1.1/statuses/user_timeline.json", "GET" )
->performRequest(), true );
Frederic,
You should be able to call the settings a single time at the top unless you are using multiple twitter accounts. I don't have access to the code currently but testing both options should be simple to do.
Thank you ExenH ! I already tested it on a small script and it seemed to work fine but I wanted to make sure because I am going to handle massive amounts of data.
Hello, I am sorry if it's a stupid question, but do I need to call "new TwitterAPIExchange($settings)" before every API request ?
ie :
Do I have to do :
$API = new TwitterAPIExchange($settings);
$result1 = json_decode( $API->setGetfield( "?user_id=1015908282&tweet_mode=extended&exclude_replies=true&include_rts=1&count=200" )
->buildOauth( "https://api.twitter.com/1.1/statuses/user_timeline.json", "GET" )
->performRequest(), true );
$API = new TwitterAPIExchange($settings);
$result2 = json_decode( $API->setGetfield( "?slug=list&$setGetfield" )
->buildOauth( "https://api.twitter.com/1.1/lists/statuses.json", "GET" )
->performRequest(), true );
Or can I do :
$API = new TwitterAPIExchange($settings);
$result1 = json_decode( $API->setGetfield( "?user_id=1015908282&tweet_mode=extended&exclude_replies=true&include_rts=1&count=200" )
->buildOauth( "https://api.twitter.com/1.1/statuses/user_timeline.json", "GET" )
->performRequest(), true );
$result2 = json_decode( $API->setGetfield( "?slug=list&$setGetfield" )
->buildOauth( "https://api.twitter.com/1.1/lists/statuses.json", "GET" )
->performRequest(), true );
Thanks for your help !
The text was updated successfully, but these errors were encountered: