all good but the don't link the name of your site tweeter account with "@" before the twitterUsername
Fernando Nunes said:
go to: components\com_k2\views\item\view.html.php and view.raw.php
find: if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { ...
and replace function with:
if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { $itemURLForTwitter = $item->absoluteURL; if($params->get('tinyURL')) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL,'
tinyurl.com/api-create.php?url='.$item->absoluteURL); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $itemURLForTwitter = curl_exec($ch); curl_close($ch); } $item->twitterURL = '
twitter.com/share?text='. urlencode( $params->get('twitterUsername') . ' '. $item->title ).'&url=' . $itemURLForTwitter; }
You can check whether your hosting supports you curl by phpinfoSorry for English ...