I posted this on StackOverflow, but thought I would try here too:
When I try to grab tweets from a public timeline, many get truncated with garbage characters and I can’t seem to grab the whole text.
I tried both the old and the new versions of twitteroauth that I could find.
This was running fine for a long time, so I’m sure it is something new to the API that I can’t seem to identify.
I’ve tried adding extended mode with no luck (still garbaged out):
$res = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?user_id=".$id."&count=".$numTweets."&tweet_mode=extended");
Tried adding a curl-encoding option to twitteroauth, still truncated.
Tried using the new twitteroauth:
$res = $connection->get(‘statuses/user_timeline’, array(‘screen_name’ => $screenName));
PHP 5.6.8 (cli) (built: Apr 15 2015 15:07:09) Copyright © 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2015 Zend Technologies
Here is an example. Could this be some memory issue? Any help would be greatly appreciated:
$res->fulltext DIRECTLY FROM RESPONSE GIVEN BY twitteroauth: “RT @GeoscienceAus: #PicOfTheDay of the #AliceSprings #satellite antenn a taken by the Chief of our #CommunitySafety & Earth Monitoring Div DΓÇª”
ACTUAL TWEET FROM twitter.com: “#PicOfTheDay of the #AliceSprings #satellite antenna taken by the Chief of our #CommunitySafety & Earth Monitoring Div Dr Andy Barnicoat!”