Solved

Displaying latest tweets on website

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

Expert Comment

by:Chris Stanyon
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now