How to Start

apps.twitter.com
authorization
javascript

#1

Hello,

I am searching a sample of a simple JavaScript app (without PHP) from authentication until a only one API search to get a JSON response, in a single HTML page, such as it is possible to find easily for Facebook Apps.

Also I would like to use it on my localhost; it seems that no possible when creating application. Is it no way without to play with the host file ?

Thanks,


#2

I’m sorry, can you be more specific (and possibly share some code) in describing what you are trying to achieve? I’m not clear on the issue here.


#3

Thank you for your interest.

I try to retrieve tweets from a search (no problem for this part in JSON call and response, this seems to me clear).
I tried with examples provided by CodeBird JS library (I have put my public and secret keys to my application).
Something wrong authentication with OAuth. In the Application Management I defined website and callback fields (and without). A popup asking me to authenticate and to accept that my application access to my data (read-only): I accept then told me to return to https://apps.twitter.com to put a code (seems a number or a token I do not know).

I see in my permission tab that I can revoke my app then I presume it has rights, but each time I launch my page authentication popup give me a code to past in this https://apps.twitter.com (but where exactly).

So I did not find an example such as simple login with callback javascript and a first call (eg Facebook).


#4

@interlectus were you able to find any resolution to this? I am trying to find the same thing but the Twitter docs are really confusing. @andypiper the code that goes into a JS file is what I’m looking for so that I can direct the button to it (Facebook’s SDK has this really clearly on their site and was a breeze to setup)