2

I found several answers and solutions, but most of it somehow integrated server-side helper.

I need something like Facebook OAuth Javascript for Twitter.

Desired flow should be (the same as FB.login() provides):

  • User clicks "Authorize this app to use my account" button/link
  • (le wild) Popup appears
  • User will be allowed to login and allow or deny authorization of my Twitter Application
  • Popup will close and javascript callback will get access token

Without using any my custom server side page.
I couldn't read out from dev documentation how could I implement this.

2 Answers 2

2

You can use Twitter's @Anywhere to let users sign in to their account via JavaScript. Look here for example:

http://dev.twitter.com/anywhere/begin#login-signup

Once the user is logged in, you can check their login state both from client and from server. On client, just use their provided function, and on server, you can validate the cookie. It is also described in that page.

http://dev.twitter.com/anywhere/begin#current-user

Sign up to request clarification or add additional context in comments.

Comments

1

And then, they realized the security problems this has and have announced they will be closing this method very soon :

"@Anywhere is deprecated and will cease functioning today, March 5th, 2013. See Sunsetting @Anywhere for more information."

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.