Support » Plugin: Rotating Tweets (Twitter widget and shortcode) » Shortcode won’t display images if tweet is longer than 115 characters

  • Resolved SethAt8vo

    (@sethat8vo)


    The shortcode won’t display images if tweet is longer than 115 characters. I’ve tried using the tweet_length and url_length variable, but neither of those will work. Here is the website URL: http://www.potomacpathways.org/. The feed is in the right column under News.

    Any ideas are appreciated. Thanks!

    Seth

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Martin Tod

    (@mpntod)

    Seth,

    Many thanks for highlighting this. What’s your shortcode? Have you set a tweet_length variable? What happens if you remove it?

    Martin

    Hi Martin,

    Thanks for the quick reply.

    My shortcode looks like this [rotatingtweets screen_name='potomacpathways' show_media='1']. I’m displaying it in the template with PHP.

    I’ve tried tweet_link but it only works when it is set to something less than 115.

    It is currently removed.

    Thanks for your help!

    Seth

    Plugin Author Martin Tod

    (@mpntod)

    You’ve found a new Twitter feature!

    It turns out that this issue is a consequence of the new longer Tweet that’s being introduced.

    There’s a new Tweet JSON format coming which should fix the problem and, with a bit of coding, allow Rotating Tweets to show the longer Tweets.

    Currently the information isn’t being sent through by Twitter: the Tweets are currently being truncated by Twitter – not by Rotating Tweets.

    Twitter’s announcement is here – although they don’t appear to have announced the time when this will be implemented yet.

    • This reply was modified 3 years, 5 months ago by Martin Tod.
    Plugin Author Martin Tod

    (@mpntod)

    This is a more interesting problem than I expected. The Twitter API is sending back a new Tweet format! The truncated value is a new one on me!

    I need to investigate some more…

    
    (
        [created_at] => Fri Oct 21 14:13:14 +0000 2016
        [id] => 789469596499664897
        [id_str] => 789469596499664897
        [text] => We're going places (and learning stuff)! Nate & Gabe are out in Tucson at the Seven Challenges IOP advanced therapi… https://t.co/cK31qTqoAk
        [truncated] => 1
        [entities] => Array
            (
                [hashtags] => Array
                    (
                    )
    
                [symbols] => Array
                    (
                    )
    
                [user_mentions] => Array
                    (
                    )
    
                [urls] => Array
                    (
                        [0] => Array
                            (
                                [url] => https://t.co/cK31qTqoAk
                                [expanded_url] => https://twitter.com/i/web/status/789469596499664897
                                [display_url] => twitter.com/i/web/status/7…
                                [indices] => Array
                                    (
                                        [0] => 121
                                        [1] => 144
                                    )
    
                            )
    
                    )
    
            )
    
        [source] => <a href="http://twitter.com/#!/download/ipad" rel="nofollow">Twitter for iPad</a>
        [in_reply_to_status_id] => 
        [in_reply_to_status_id_str] => 
        [in_reply_to_user_id] => 
        [in_reply_to_user_id_str] => 
        [in_reply_to_screen_name] => 
        [user] => Array
            (
                [id] => 1708069177
                [id_str] => 1708069177
                [name] => Potomac Pathways
                [screen_name] => PotomacPathways
                [location] => Cabin John, MD
                [description] => Substance abuse and behavioral Healthcare for teens and young adults
                [url] => https://t.co/SvzJ9mB148
                [entities] => Array
                    (
                        [url] => Array
                            (
                                [urls] => Array
                                    (
                                        [0] => Array
                                            (
                                                [url] => https://t.co/SvzJ9mB148
                                                [expanded_url] => http://www.potomacpathways.org
                                                [display_url] => potomacpathways.org
                                                [indices] => Array
                                                    (
                                                        [0] => 0
                                                        [1] => 23
                                                    )
    
                                            )
    
                                    )
    
                            )
    
                        [description] => Array
                            (
                                [urls] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [protected] => 
                [followers_count] => 30
                [friends_count] => 24
                [listed_count] => 3
                [created_at] => Wed Aug 28 19:12:38 +0000 2013
                [favourites_count] => 4
                [utc_offset] => 
                [time_zone] => 
                [geo_enabled] => 1
                [verified] => 
                [statuses_count] => 65
                [lang] => en
                [contributors_enabled] => 
                [is_translator] => 
                [is_translation_enabled] => 
                [profile_background_color] => 000000
                [profile_background_image_url] => http://abs.twimg.com/images/themes/theme1/bg.png
                [profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme1/bg.png
                [profile_background_tile] => 
                [profile_image_url] => http://pbs.twimg.com/profile_images/690935619556655104/vxFmril__normal.jpg
                [profile_image_url_https] => https://pbs.twimg.com/profile_images/690935619556655104/vxFmril__normal.jpg
                [profile_banner_url] => https://pbs.twimg.com/profile_banners/1708069177/1453567200
                [profile_link_color] => 4A913C
                [profile_sidebar_border_color] => 000000
                [profile_sidebar_fill_color] => 000000
                [profile_text_color] => 000000
                [profile_use_background_image] => 
                [has_extended_profile] => 
                [default_profile] => 
                [default_profile_image] => 
                [following] => 
                [follow_request_sent] => 
                [notifications] => 
                [translator_type] => none
            )
    
        [geo] => 
        [coordinates] => 
        [place] => 
        [contributors] => 
        [is_quote_status] => 
        [retweet_count] => 0
        [favorite_count] => 0
        [favorited] => 
        [retweeted] => 
        [possibly_sensitive] => 
        [lang] => en
    )
    
    Plugin Author Martin Tod

    (@mpntod)

    Aha! There’s a new Tweet JSON format coming which should fix this. Twitter’s announcement is here – although there doesn’t appear to be a time for this yet.

    Currently Rotating Tweets is displaying everything that Twitter is sending through – e.g.

    
    (
        [created_at] => Fri Oct 21 14:13:14 +0000 2016
        [id] => 789469596499664897
        [id_str] => 789469596499664897
        [text] => We're going places (and learning stuff)! Nate & Gabe are out in Tucson at the Seven Challenges IOP advanced therapi… https://t.co/cK31qTqoAk
        [truncated] => 1
        [entities] => Array
            (
                [hashtags] => Array
                    (
                    )
    
                [symbols] => Array
                    (
                    )
    
                [user_mentions] => Array
                    (
                    )
    
                [urls] => Array
                    (
                        [0] => Array
                            (
                                [url] => https://t.co/cK31qTqoAk
                                [expanded_url] => https://twitter.com/i/web/status/789469596499664897
                                [display_url] => twitter.com/i/web/status/7…
                                [indices] => Array
                                    (
                                        [0] => 121
                                        [1] => 144
                                    )
    
                            )
    
                    )
    
            )
    
        [source] => <a href="http://twitter.com/#!/download/ipad" rel="nofollow">Twitter for iPad</a>
        [in_reply_to_status_id] => 
        [in_reply_to_status_id_str] => 
        [in_reply_to_user_id] => 
        [in_reply_to_user_id_str] => 
        [in_reply_to_screen_name] => 
        [user] => Array
            (
                [id] => 1708069177
                [id_str] => 1708069177
                [name] => Potomac Pathways
                [screen_name] => PotomacPathways
                [location] => Cabin John, MD
                [description] => Substance abuse and behavioral Healthcare for teens and young adults
                [url] => https://t.co/SvzJ9mB148
                [entities] => Array
                    (
                        [url] => Array
                            (
                                [urls] => Array
                                    (
                                        [0] => Array
                                            (
                                                [url] => https://t.co/SvzJ9mB148
                                                [expanded_url] => http://www.potomacpathways.org
                                                [display_url] => potomacpathways.org
                                                [indices] => Array
                                                    (
                                                        [0] => 0
                                                        [1] => 23
                                                    )
    
                                            )
    
                                    )
    
                            )
    
                        [description] => Array
                            (
                                [urls] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [protected] => 
                [followers_count] => 30
                [friends_count] => 24
                [listed_count] => 3
                [created_at] => Wed Aug 28 19:12:38 +0000 2013
                [favourites_count] => 4
                [utc_offset] => 
                [time_zone] => 
                [geo_enabled] => 1
                [verified] => 
                [statuses_count] => 65
                [lang] => en
                [contributors_enabled] => 
                [is_translator] => 
                [is_translation_enabled] => 
                [profile_background_color] => 000000
                [profile_background_image_url] => http://abs.twimg.com/images/themes/theme1/bg.png
                [profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme1/bg.png
                [profile_background_tile] => 
                [profile_image_url] => http://pbs.twimg.com/profile_images/690935619556655104/vxFmril__normal.jpg
                [profile_image_url_https] => https://pbs.twimg.com/profile_images/690935619556655104/vxFmril__normal.jpg
                [profile_banner_url] => https://pbs.twimg.com/profile_banners/1708069177/1453567200
                [profile_link_color] => 4A913C
                [profile_sidebar_border_color] => 000000
                [profile_sidebar_fill_color] => 000000
                [profile_text_color] => 000000
                [profile_use_background_image] => 
                [has_extended_profile] => 
                [default_profile] => 
                [default_profile_image] => 
                [following] => 
                [follow_request_sent] => 
                [notifications] => 
                [translator_type] => none
            )
    
        [geo] => 
        [coordinates] => 
        [place] => 
        [contributors] => 
        [is_quote_status] => 
        [retweet_count] => 0
        [favorite_count] => 0
        [favorited] => 
        [retweeted] => 
        [possibly_sensitive] => 
        [lang] => en
    )
    

    As you might imagine, it will be a fairly immediate priority to implement the new extended Tweet format as soon as it is switched on!

    Okay, thanks! I appreciate you taking the time to look into this.

    Seth

    Plugin Author Martin Tod

    (@mpntod)

    There’s now a development version that uses the longer tweet.

    Does it work for you?

    Plugin Author Martin Tod

    (@mpntod)

    The latest upgrade should fix this.

    That fixed it. Thank you! I gave you a 5 star review. I really appreciate the quick response and support!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Shortcode won’t display images if tweet is longer than 115 characters’ is closed to new replies.