Virya Technologies Blogs

Blogs from Virya Technologies staff

Posted by Ruth Cheesley
Ruth Cheesley
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team...
User is currently offline
on Tuesday, 07 June 2011
in Website design

How to fix your broken 'Tweet This' Twitter links in K2 and Adsfactory (and anywhere you're trying to post a message to a Twitter status!)

Recently Twitter moved over to its Web Intents Platform which may well have passed you by - it certainly did me, until I had a few calls from clients saying that their 'Tweet This' links - particularly in K2 and AdsFactory in Joomla! but I assume this is the case in a huge range of web-based applications - had stopped working.

After a bit of digging, as it didn't appear to be reported many places, I came across this article on HighTechDad talking about the new system, and the changes we need to make to URL's to use it.

What is the problem?

Basically the problem lies with the fact that the start of the URL path is generally hard-coded into systems, with the rest of the URL being dynamically generated based on what page you're browsing - so it automatically inserts the page title, URL and so forth preceeded by "I am currently reading ..." or something similar. As the URL has now changed, this needs to be updated. If you don't update it, your tweeters will just be dropped into their twitter homepage with no message in the status window ready to tweet (although you'll notice it appears in the URL).

Here is the old format for tweeting directly to a status message:

http://twitter.com/home?status=

Here is the new format for tweeting directly to a status message:

http://twitter.com/intent/tweet?text=

Clearly this requires some changes to be made:

K2

In K2, locate the file called view.html.php in components>com_k2>views>item

On line 220, change:

$item->twitterURL = 'http://twitter.com/home/?status='.urlencode('Reading @'.$params->get('twitterUsername').' '.$item->title.' '.$itemURLForTwitter);

to:

$item->twitterURL = 'http://twitter.com/intent/tweet?text='.urlencode('Reading @'.$params->get('twitterUsername').' '.$item->title.' '.$itemURLForTwitter);

AdsFactory

In Adsfactory you will need to edit the template that you're using - probably in the t_details_add_toolbar.tpl or t_add_details.tpl file. Just search for 'twitter' and replace the URL you find with the new string above.

Please leave a comment if you need help finding this in other components and I'll do my best to find it for you!

Rate this blog entry
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team.

I am primarily involved with the day to day management of our website projects, ongoing support contracts and liaising with our clients from across the world.
Trackback URL for this blog entry

Comments

No comments made yet. Be the first to submit a comment

Leave your comment

Guest
Guest Tuesday, 22 May 2012

Looking for our open source software?

viryasoftwarelogo

We release and support our open source software at Virya Software

Find us on

facebook    linkedin    twitter     youtube    vimeo    ViryaTechnologiesJoomlaResources    ViryaTechnologiesonTechnorati    rss

Virya Technologies Newsletter

Receive all the latest tips, news and reviews from Virya Technologies.

Come and meet us!

JUN
01

01.06.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUN
01

01.06.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

JUN
14

14.06.2012 19:30 - 22:00
Joomla! User Group Suffolk Meeting

JUL
06

06.07.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUL
06

06.07.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

The latest from Virya Technologies

Virya Technologies After an awesome #jab12 event we are offering 20% discount on all extensions until 7th June - use JAB12 coupon code at http://t.co/XrDJFRbq
Monday, 21 May 2012 07:46
twitter Follow Viryatech on Twitter