twitter.com has switched a few things around with its introduction of "new twitter", from twitter.com/username to twitter.com/#!/username. This causes breakage of the twitter service link; when clicked it goes to twitter.com but does not fill in the desired info in the tweet box but rather fills the url with gobbeldygook from the service links module (the currently used twitter.com/status?= is depreciated).

working on a patch, will post soon.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skjalf’s picture

Status: Active » Needs review
FileSize
612 bytes

Uploading patch that updates Twitter service links to be compatible with New Twitter.

skjalf’s picture

Assigned: skjalf » Unassigned
antigonah’s picture

I do not know why, but dont´n display the source url, only title text. Someone the same thing happens?

kurkuma’s picture

The actual URL built by the module for twitter (twitter.com/home/?share...) doesn't work in the new twitter, it seems it is deprecated. But the url of the form twitter.com/?share... works for both of them.
It could be a temporary solution, as twitter is changing and the old style url will eventually stop working.

Until the module is fixed I have sorted this out adding a "good twitter" service links hook in my module with the following code:

function mymodule_service_links() {
  $links = array();
  $links['good_twitter'] = array(
    'name' => 'Good Twitter',
    'description' => t('Share this on Twitter'),
    'link' => 'http://twitter.com/?status=<encoded-short-url>+--+<encoded-title>',
  );
  return $links;
}
thedane’s picture

Unfortunately, the patch in comment #1 doesn't seem to work for me, and neither is the hook in comment #4.

I also tried

  $links['twitter'] = array(
    'name' => 'Twitter',
    'description' => t('Share this on Twitter'),
    'link' => 'http://twitter.com/intent/tweet?text=<encoded-title>&url=<encoded-short-url>',
  );

but that doesn't seem to work either.

Anybody got any other thoughts on this?

brunodbo’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
FileSize
620 bytes

Let's try this:

Attached patch changes Twitter links to

'link' => 'http://twitter.com/share?original_referer=<encoded-short-url>&text=<encoded-title>',
brunodbo’s picture

Priority: Normal » Critical

Bumping to critical, as Twitter sharing is currently broken.

Liliplanet’s picture

subscribe thx!

kurkuma’s picture

We tried the url in #4 in both twitter versions (old and new) and it worked. The hook is fine and we replaced the Twitter link of the module with the good_twitter defined in our module. Beware of the icon to use, it must have the same name that the servide id, so we cloned twitter.png to good_twitter.png.
As I said it seems like a temporary solution but so far is the one that works in all cases for us.

CarlHinton’s picture

This worked for me:

  $links['twitter'] = array(
    'name' => 'Twitter',
    'description' => t('Share this on Twitter'),
    'link' => 'http://twitter.com/intent/tweet?text=<encoded-title>&url=<encoded-short-url>',
  );

#4 does not provide the url to twitter

gsquirrel’s picture

patch in #6 seems to work for me

Liliplanet’s picture

tried #6 and #10 .. unfortunately neither works for me

TheCrow’s picture

I just tried the latest dev and the simple twitter service (not the widget) work for me, someone can confirm that tweeting some post on my personal website?

anzolnet’s picture

After patching, disable and enable again the Twitter widget. This helped me.

kurkuma’s picture

This could be a stupid suggestion but when trying to post to twitter do it with both configurations (new and old twitter). They can be switched in your twitter account.

joostvdl’s picture

Patch #6 is working

TheCrow’s picture

Status: Needs review » Fixed

commited the #1 which come from the standard twitter documentation.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Chad_Dupuis’s picture

Status: Closed (fixed) » Active

I hate to open this up again, but this does not appear to be fixed (or at least appears to be broken again). As far as I know all was working well with the latest service links and shorten urls, in the last week I've received complaints from our users at http://www.yinyanghouse.com/ that it only sending the title again with no link to the content. I've tried it myself and this appears to be the case.

Any ideas? Is this working for everyone else?

TheCrow’s picture

Status: Active » Closed (fixed)

still working well...

runzipel’s picture

maybe you should deactivate "Use "www." instead of "http://"" in Shorten module ( admin/settings/shorten/general).

Twitter does not recognize your url without "http://"