pavelk2 / social-feed

JavaScript plugin that shows a user feed from the most popular social networks
http://pavelk2.github.io/social-feed-example/
MIT License
962 stars 304 forks source link

Support for 140+ tweets #240

Closed martijngastkemper closed 6 years ago

martijngastkemper commented 7 years ago

Some tweets didn't show the attached image. I found that the media didn't show up in the API response. After some research I found the Twitter developers page which mentions some upcoming changes to the api. Only the first 140 characters of a tweet are taken into consideration, so when an image is added after those 140 characters it's not added as media in the API response.

This PR solves that problem by adding an option to change the tweet_mode. Just changing the mode to "extended" isn't possible, because the full tweet will be displayed instead of the truncated one.

The result with default settings (tweet_mode=compatibility)

screen shot 2017-01-02 at 08 38 32

The result with tweet_mode=extended

screen shot 2017-01-02 at 08 36 29