WordPress.org

Ready to get started?Download WordPress

Forums

WP to Twitter
[resolved] Unshortened URLs being cut short when posting (9 posts)

  1. iwords
    Member
    Posted 1 year ago #

    I've run into a problem with the latest version of WP to Twitter recently that I don't remember experiencing with the previous version.

    I have the plug-in configured to automatically send a tweet in the format #title# #tags# #url# when I create a new post in WP. I have "Don't shorten URLs" selected, so any URLs sent to Twitter should be shortened by Twitter (or at least that's my understanding).

    At first, I found that the plug-in would sometimes omit the tags when creating the tweet, even though the Twitter post was within the 140 char limit, so I amended the plug-in's settings so that titles and tags were both set to 0 in the "Preferred status update truncation sequence" section, and that seemed to stop that.

    However, what seems to be happening now is that the plug-in is truncating the URL when creating the tweet, even when there should be enough 'space' within the 140 char limit.

    Also, if when creating a new post in WP, I scroll down to the WP to Twitter panel and create a custom Twitter post by manually entering the post's title, tags, and add #url# at the end, the "Characters left" count shows there's still a few characters left.

    But when I publish the post, the tweet that appears in Twitter has still had its URL truncated, and is therefore invalid.

    Any ideas why this is happening? Has something changed in the way URLs are sent to Twitter since the previous version? Is the only way to fix it to use one of the other shortening services?

    Grateful for any suggestions.

    http://wordpress.org/extend/plugins/wp-to-twitter/

  2. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not certain what this is right now, but I'm investigating, and hope to have the issue fixed today.

    Question: when you're adding tags into the custom Twitter post, are you using the #tags# shortcode, or are you entering your hashtags by hand?

    The #tags# shortcode is not a field that gets an expanded count in the character counter at this point, so including #tags# in the count won't give you an accurate count.

  3. iwords
    Member
    Posted 1 year ago #

    Thanks for your response.

    Just to confirm, in the example I gave above I had been adding the tags manually, i.e. not using the #tags# shortcode.

  4. iwords
    Member
    Posted 1 year ago #

    I've just tried the new version released yesterday, and it still doesn't seem quite right.

    Here are two tweets as examples:

    https://twitter.com/TestDrivenUK/status/277090218597810176

    This tweet was generated automatically by the plug-in. When you hover over the URL at the end, you can see it's been truncated, and when you click on it, t.co also redirects to the truncated URL. However, somehow WordPress seems to understand where you meant to be going and sends you there anyway.

    https://twitter.com/TestDrivenUK/status/277090910695723008

    In this second example, I entered the text for the tweet manually when creating the post. I only used the #url# shortcode, not the #tags# shortcode (I entered the tags manually). The URL in this example is also truncated, but again, WP somehow seems to figure it out.

    Any ideas? Thanks for looking into this so far.

  5. Autodino
    Member
    Posted 1 year ago #

    Same problem on my site! In previous version i used "No shortener" and had no problems. Now with the new version URL is cut after www. Seems to work when you set it to "Use WordPress as URL Shortener".

    Greest
    Ralf

  6. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    I found the issue with the truncated URL; that should be fixed shortly (assuming I found the right issue.)

    As to the tags - if you're adding hashtags manually then they aren't protected in the truncation process. If you're using the tags-to-hashtags conversion, then WP to Twitter is aware of what the tags should be, and will eliminate the entire tag if the Tweet turns out too long, and also gives you the ability to choose which fields will be truncated first - if you need your tags more than you need the post excerpt or complete title of the post, for example. However, if you're entering them as free text, they just become part of the general free-text area of the plug-in, and may simply be chopped off.

  7. iwords
    Member
    Posted 1 year ago #

    Sounds great, thanks, I'll test again when the update is released.

    Understand re: the tags.

    Do you mind if I ask if you can confirm how the "Preferred status update truncation sequence" works in the plug-in's settings page? It's defined as: "This is the order in which items will be abbreviated or removed from your status update if it is too long to send to Twitter."

    I assume that means that items that occur first in the list (i.e. low numbers) will be abbreviated or removed first, or is it the other way around?

    And does having an order of 0 (zero) stop that particular item from being shortened or does it just mean "before 1"?

    Thank-you.

  8. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    Yes - lower numbers are abbreviated first, and zero just means 'before 1'. There's no way of completely preventing anything from being shortened.

  9. iwords
    Member
    Posted 1 year ago #

    I've only had a chance to make a couple of quick test posts, but I'm fairly sure this is resolved now.

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.