Solved

Displaying latest tweets on website

Posted on 2013-11-13
3
370 Views
Last Modified: 2013-11-13
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.
0
Comment
Question by:mike99c
3 Comments
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39646587
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.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39646642
Yes you need a server to do an OAuth authentication and consume Twitter web services.
The process is well described here :
https://dev.twitter.com/docs/auth/obtaining-access-tokens
https://dev.twitter.com/docs/api/1.1
https://dev.twitter.com/docs/moving-basic-auth-oauth

What abou using a widget?
https://twitter.com/settings/widgets
0
 

Author Comment

by:mike99c
ID: 39647102
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.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTTPS jquery doesn't work 9 63
how to avoid redundand ajax calls 5 30
JavaScript behaviour different on local machine and network share 11 51
Jquery keyup 4 20
Read about why website design really matters in today's demanding market.
A great marketing strategy is diverse.  Read about the not so popular, yet effective, marketing tactics you can start using today!
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question