Add support for Twitter

jamesmcd - July 2, 2009 - 13:54
Project:Service links
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have been trying to do a custom job on this myself but I am lacking the url/code required to grab the node title and url etc in order to post through to twitter. I have looked through the Twitter API but haven't located it yet. If anyone has done something similar I would appreciate hearing from you if you have been successful. Also would consider this a feature request

#1

jamesmcd - July 2, 2009 - 14:42

Just worked it out:

In service_links.module add the following:

if (variable_get('service_links_show_twitter', 0)) {
    $links['service_links_twitter'] = theme('service_links_build_link', t('Twitter'), "http://twitter.com/home?status=$url&title=$title", t('Post to Twitter.'), 'images/twitter.png', $nodelink);
  }

In service_links.install add the following:

variable_del('service_links_show_twitter');

In the 'images' folder add the file:

twitter.png (See attached)

-------------

Not sure if I have missed anything but it seems to be working fine for me so far!

AttachmentSize
twitter.png 3.58 KB

#2

TheCrow - July 4, 2009 - 14:48
Status:active» fixed

already into the dev version

#3

System Message - July 18, 2009 - 14:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.