Solved

Displaying latest tweets on website

Posted on 2013-11-13
3
377 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

830 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