We often get questions from OSTraining members wondering how to show tweets on their site.
Twitter doesn't make it particularly easy to do this. Certainly there are no YouTube-style embed codes for multiple tweets.
For Joomla sites, we recommend the SP Tweet extension to make the process easier.
In this tutorial, we'll show you how use SP Tweet to automatically display your tweets inside a module.
Step #1. Create a Twitter app
Twitter recently updated its API to 1.1 and one major changes that you must now create an app in order to get access tokens and consumer keys from Twitter developer page.
- Go to https://dev.twitter.com/ and login with your Twitter account.
- Click My applications
- Click the Create new app button.
- Enter the information such as Title, Description and Website. You can leave the Callback URL field empty.
- Click the Yes, I agree checkbox.
- Click Create your Twitter application.
If everything is correct, you will see a succes message.
- Go to the API Keys tab of your new app.
- Scroll down to the Your access token section and click the Create my access token button.
If everything is fine, you will see a message that tells you to refresh the page to load the new tokens. Refresh the page until you have a similar result to the following screenshot:
This data will be used in Step 3 to set up the SP Tweet module.
Step #2. Install SP Tweet
- Go to the SP Tweet page and click Download.
- Login to your Joomla administrator area.
- Go to Extensions > Extensions Manager.
- Click Upload a Package File and upload SP Tweet.
Step #3. Configure the module
- Go to Extensions > Module manager > New > SP Tweet
- In Show twitter ID, enter a twitter account name
Add the data generated in Step #1 from your twitter app:
- API key
- API secret
- Access token
- Access token secret
- Publish the module in a valid position and save.
Step #4. Check the result
Visit your site and see how the module looks: