Issue with Twitter: Solved

Dear all,

had a problem with including twitter feeds of a single user (using from:@USER as search string). In this case, images as well as profile pictures were not shown, but strangely only for certain users. Had a look at the twitter id of this user, which is used to save cache files in the library. This id was very long. Twitter states that they moved to 64 bit twitter ids, leading sometimes to problems with some programming languages.
As a solution (which you might want to check), I replaced in the file lib/Widget/twitter.php the id with the alternative id_str, provided by twitter:

$file = $this->mediaFactory->queueDownload(‘twitter_’ . $tweet->user->id_str, $tweet->user->profile_image_url, $expires);

$file = $this->mediaFactory->queueDownload(‘twitter_photo_’ . $tweet->user->id_str . ‘_’ . $mediaObject->id_str, $photoUrl, $expires);

After that change, twitter also fetched images and profile pictures for twitter ids requiring 64 bit support

Best
Christian

The Xibo Community site uses cookies. What are cookies?