I wished to show a number of posts from a twitter account on a website.
The website page would show the latest Twitter entries (timeline) associated with an account.
Twitter has a couple of pages from which details were derived about adding a timeline to a website.
The code takes the form of
<a class="twitter-timeline" href="https://twitter.com/vntweb" data-height="400">Tweets by VNTweb</a>
There are also options for setting the width, height, number of entries of the shown feed as well as a number of others. The configuration options are easy to add. Prepend each one with data- and enclose the value in quotes.
Tweets by @VNTweb<a class=”twitter-timeline” href=”https://twitter.com/vntweb” data-height=”400″>Tweets by VNTweb</a>
Tweet #vntwebFor a WordPress website you can add the code using the custom HTML or text widgets. There’s no need to use a custom widget for this.
Although you may find that your chosen widget presents a friendly interface with the configuration options laid out as checkboxes and text boxes.
and the required javascript:
twttr.widgets.createTimeline(
{
sourceType: "profile",
screenName: "twitterdev"
},
document.getElementById("container"),
{
height: 400,
chrome: "nofooter",
linkColor: "#820bbb",
borderColor: "#a80000"
}
);
Tweet #vntweb


