In this way we’ll embed our last tweets into our web page.
What about the APIs?
Here there’s the code to insert into your page:
The first one:
cares about the creation of a list of tweets coming from your account and inserts them into the “twitter_update_list”, with the time of creation.
The second one:
communicates to the main server the number of tweets to show into your web page (in this case the counter is set to 5, so your 5 last tweets will be shown).
You’ll have to erase ID and insert your twitter account’s id.
With some small CSS changes you will be able to give a style to this list and here you are: your twitter account is completely embedded into your site. Easy!
And if you would customize the aspect of your tweets?
Twitter APIs customization
First of all you can insert an image for each tweet, to create an unique list!
Let’s take a look:
For each one of your tweets the function twitterCallback2 takes its content and inserts it into the “twitter_update_list” with a link to your original tweet and with the time of creation.
If we want to reach this goal, the code to customize is here:
For example, trying to add the classic twitter-bird image before the tweet:
Modding the CSS, the result is this.
Now check this line:
“+username+” refers to your Twitter username, so you can use this variable in this way:
just playing with the CSS and the result is this.
Twitter and Facebook connection…
If you have got a fan page on facebook at the link www.facebook.com/twitter you’ll be able to connect your twitter account to your facebook fan page: all the things written on facebook will be automatically sent to twitter and, obviously will be viewed into your site, because the script recognizes it as a tweet.
Facebook sends not only what you write but the events too: you can choose from the settings of facebook which infos have to be sent to twitter.
The mods you can do thanks to this script are a lot: your tweets can be at the same moment just a detail of your page, or can be the most important element of it.
Details make a web site beautiful, this tweets could be the icing on the cake of your work.
You only have to free your imagination!