Spring Manual

Twitter Widgets

Twitter Widgets allow you to embed a Twitter timeline into a page on your Spring website. You can embed a timeline for Tweets from and individual user, a user's favorites, Twitter lists, or any search query or hashtag.

Create a widget

1. Firstly, make sure you are logged into the Twitter website, then create your own embedded timeline from the widgets setings page.

2. When you save the changes to your Twitter widget, copy the code displayed below the widget preview. You only require the first line of the code, but may need to copy both lines then trim the copied code in a text editor.

The code you require should look like the following:

<a class="twitter-timeline" href="https://twitter.com/writespringdev" data-widget-id="329798588236431360">Tweets by @writespringdev</a>

Embed the code

1. In Spring, edit the page you wish to embed the Twitter Timeline.

2. Click the 'Edit HTML Source' button

Edit HTML Source

3. In the 'Edit HTML Source' dialog box, paste the trimmed code copied previously into the editor into the required location being careful not to overwrite any content you wish to retain.

4. Click the 'Update' button to save the changes to the HTML Source and close the dialog

You should now see a plain link that looks similar to the following:


5. Save the page

When you preview the page you should now see the embedded Twitter Timeline.

View an example of an embedded Twitter Timeline