Last updated February 9, 2012. Created by psydone on October 2, 2009.
Edited by froboy, steinmb. Log in to edit this page.
Themers/Designer - A simple example of the module put to use would be using the twitter_fetch_timeline call to retrieve a users timeline and insert the resulting text into the site_slogan variable.
<?php
$twarray = twitter_fetch_timeline('username');
$site_slogan = $twarray[0][text];
?>Placing this text nearest the top of a theme page such as page.tpl.php. Will subscribe the site slogan to the 'username's latest tweet posting.
Please note this can/does affect performance. Improvements to the documentation are welcome.
Comments
WSOD
Did anyone else try this and get a White Screen of Death?
The function is 'twitter_fetch_user_timeline' NOT 'twitter_fetch_timeline'.
Confused
Not sure I understand what this means? What does "Will subscribe the site slogan to the 'username's latest tweet posting." mean exactly?
site slogan is updated with latest tweet
I believe it means that the site slogan on your Drupal site will automatically be updated to the latest tweet.
IOW:
$twarray = twitter_fetch_timeline('username'); // get the latest tweet from 'username'$site_slogan = $twarray[0][text]; // update the site slogan with the tweet
function not found
i get function not found error for both twitter_fetch_user_timeline and twitter_fetch_timeline.
I have the twitter module installed v3. Is there anything else i need to do?
Thanks
ISIMO web developmet
This approach is not wise.
This approach is not wise. Please see #1261704: Add a hook when Tweets are saved at hook_twitter_status_save() for a better approach.