Many people are now using twitter to keep friends, clients and others updated on what they’re doing – as such we often get asked about embedding a twitter feed in drupal websites when clients come to see us.
There are several modules available within Drupal such as the obviously named twitter, but sometimes this can be a bit of an overhead if you’re not wanting to do any more than display tweets on a webpage. All is not lost though, as twitter information can be easily embedded in a Drupal site without requiring any additional modules.
This code can be embedded in a standard Drupal block (although you’ll probably want to replace the twitter name in the setProfile call) – simply login as an administrator, or a user with permission to post full html code and
- Navigate to Administer » Blocks » Add Block
- Specify an appropriate description for the block – ”Twitter“ seems appropriate
- Paste the code generated for the twitter widget into the body
- Ensure that you’ve changed the Input Format to ‘Full HTML‘
- Complete any other appropriate fields, such as pages for the block to appear on
- Click ‘Save Block’
- Position the new block into the required region and click ‘Save Blocks’
Hopefully, with this in place, you should now be able to see your tweets in full technicolor glory!