Link to home
Start Free TrialLog in
Avatar of mike99c
mike99c

asked on

Displaying latest tweets on website

I build websites for multiple clients and I need to display the latest tweets from their Twitter accounts on their website home pages. In the past I used a simple JQuery plug in but I understand Twitter changed the rules and now require authentication to take place.

Currently I build websites using ASP Classic with VBScript. Can you please explain in very simple terms the easiest way to get the latest tweets from a twitter account and display it?

Ideally I would prefer to have it all done client side using JQuery but I understand there may need to be some server side work involved with the authentication.
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Yeah - it'll need to be done server-side. I don't know the specifics of ASP or VBScript (I use PHP), but the principle will be the same.

You need to use oAuth to authenticate your account. Firstly you need to login to your twitter account and register an Application. Give it a name, fill in some details and you'll then be given the API Keys you need.

You then need an oAuth library specific to your scripting language. When configuring it for access you'll need the keys from the App that you've registered.

Once that's done, your script can request information (tweets etc) from Twitter, and you can pass these into your page.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mike99c
mike99c

ASKER

Thanks leakim971, I hadn't looked into the Twitter widget, this is exactly what I need. I managed to generate a widget from my account and can see that it has the following variables:

Twtter username
Data widget ID - can only get when you generate the widget.

So I was thinking about a process for installing this widget for my future clients. Presumably I should ask them to do the following:

1. Sign in to your Twitter account
2. Click on the cog wheel top right then select "Settings"
3. Select "Widgets" on the left column
4. Click "Create new"
5. Click "Save changes"
6. Copy the code under the preview box and email it to me.

I guess that I am only really after the data-widget-id but it would be easier to just ask the client to send the code then I can extract the widget id and insert it into my own customised script with the correct size and colours.