Beginner to OAuth

javascript

#1

Hi there!

I am very new to javascript and apis (started a few months ago) and I am working on a project atm where me and my group want to have a twitter respond feed that match certain topics. (e.g: Get 10 latest tweets about the White House).

Now I have been looking around on web to find tutorials on how to do this using only html and javascript (no jquery!), but all of the tutorials I find are with node.js or have jquery in them or in another language.

I want to find a beginner tutorial that shows how to use OAuth and twitters API with only html and javascript, if that is possible?

Can anyone help me with this?

Many thanks


#2

Hi there Erik - you will definitely find this difficult to do from client-side Javascript, because the Twitter API does not support something called CORS which allows cross-site authentication. I’d recommend looking at a node.js server-side solution, which would not hit that problem.