How do I display Tweets on my site?
Thanks to a new Hunter WebCMS portlet, you can now dislpay your latest tweets on your site. They will be shown in the form of a Twitter Timeline. Note that prior to installing your timeline, you will have to create a Twitter Widget and retrieve your Widget ID. This is a one-time operation that only takes a minute and that is covered in another tutorial on this site (see How do I find my Twitter Widget ID?).
Since the Twitter timeline is a portlet, we will start by visiting the Portlet Management page: the link is at the bottom of each portlet area, as well as the main content area, and looks like this:
Select the area where the timeline will be displayed, click on the corresponding dropdown menu, and select Twitter Timeline widget. This will open the Twitter Timeline settings page showing the following fields:
- Title: This is optional. If no title is entered, the portlet will display: Tweets by @[username]" by default. If you wish to remove any title, check the Omit portlet border at the bottom of the page.
- Twitter Username: Twitter usernames start with the @ symbol, just as in @Hunter_College or @HunterSciMON. Note that you do not need to own the Twitter account to display its tweets as long as you have a Widget ID.
- Twitter Widget ID: an 18-digit unique code. Follow this quick tutorial to retrieve yours.
- Exclude tweeted replies: Check this box to display only the tweets you send to start conversations. All replies will be excluded (recommended because of the possible lack of context/relevance of a reply).
- Remove the border from around the tweets and the timeline? Think of the timeline as a spreadsheet column, where each tweet is in a separate cell. By checking this box, you remove the cell's borders.
- Portlet height: The portlet offers four options—one of them being a custom pixel height—to blend organically with the rest of your content.
- Omit portlet border: As mentioned above, by checking this box you will remove the default header, border, and footer of the portlet.
Click Save and preview on your site.
A Twitter follow button complements timelines nicely. Read our tutorial and learn how to add a Twitter follow button.