• Resolved msebald

    (@msebald)


    As a new user of Social (I upgraded the Twitter Tools plugin which now uses Social) I noticed that Social has some effects that Twitter Tools did not have when posting new articles to Twitter.

    For example the link sent to Twitter looks like this https://www.domain.tld/?p=106 instead of https://www.domain.tld/2012/10/15/article (which in my case is the url scheme given in WordPress config).

    Also I do not have any chance to set an url shortener like bit.ly or an own URL shortener like YOURLS. Twitter Tools had some extra plugins for this.

    Will the first issue be resolved and what about the second issue, which is more like a feature request?

    Cheers,
    Martin

    https://www.ads-software.com/extend/plugins/social/

Viewing 8 replies - 1 through 8 (of 8 total)
  • This was bugging me as well. I was able to tweak the plugin to change this manually. It was easy enough. Just do a find and replace of all instances of wp_get_shortlink with get_permalink.

    I found five that needed to be replaced:

    Search "wp_get_shortlink" (5 hits in 3 files)
      \wp-content\plugins\social\lib\social\controller\aggregation.php (1 hits)
    	Line 38: 		$url = wp_get_shortlink($post->ID);
      \wp-content\plugins\social\lib\social\service.php (2 hits)
    	Line 386: 					$url = wp_get_shortlink($post->ID);
    	Line 462: 					$url = wp_get_shortlink($comment->comment_post_ID);
      \wp-content\plugins\social\social.php (2 hits)
    	Line 140: 			$url = wp_get_shortlink($post->ID);
    	Line 1121: 			$shortlink = wp_get_shortlink($post_id);

    There were also two instances in the README.txt file but those can be ignored.

    The only problem is when you do this it will truncate the other content in your Tweet, e.g. https://twitter.com/SeattleBubble/status/257904154129874944

    Another option I found (which is probably what I’ll be using) is to install this Goo.gl plugin, which replaces the output of wp_get_shortlink with a Goo.gl URL, and adds a nifty little stats tracking link right to your posts admin page.

    Thread Starter msebald

    (@msebald)

    Hi Tim,

    thank you for this hack/fix, which I already implemented. Sure the tweet will be truncated if too long, but normally I only post the article title, which should fit into the tweet also with the longer URL.

    Would this fix not be a good thing to put into the plugin, to chosse between shortlink and permalink?

    Cheers,
    Martin

    We came on here about this issue as well. We’d prefer not to hack the plugin itself and we don’t want our post titles to be truncated in our tweets so we might try to the goo.gl plugin.

    @the_tim:

    Do you know if the goo.gl shortlink resolves to the post’s actual pretty permalink?

    If we have WP.me shortlinks turned on in Jetpack, Social will send a wp.me shortlink that goes to a t.co shortlink that finally resolves as a https://www.yourblog.com/?p=### link.

    If we turn off WP.me shortlinks in Jetpack, Scial will send the https://www.yourblog.com/?p=### link, which I think Twitter will shorten as a t.co link, but eventually resolves as the https://www.yourblog.com/?p=### URL.

    Thanks for your help.

    SoItsComeToThis

    (@soitscometothis)

    Alex,

    I think many people are asking for native Bit.ly support. Is this something we can expect in the future? I’m hopeful Social will handle this instead of yet another plugin and some coding – which I consider no different than the hacks presented above.

    Hopefully bit.ly support will be re-introduced in a future version.

    alexkingorg

    (@alexkingorg)

    Bit.ly has a WP plugin, why should Social or Twitter Tools duplicate that code?

    Nancy Nardi

    (@nardiphoto)

    I use Bitly with a custom URL. If you use the Woo Dojo plugin, enable the Short Link option, which will generates short URLs for your posts, using your URL shortening service of choice – either Bit.ly or Tiny url – not sure about the others.

    When posts are broadcast with Social, links are automatically shortened with the bit.ly custom url

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Social] Url given to Twitter’ is closed to new replies.