Logging in with a Twitter account

Related to the work I was doing on calculatorbot, I just put together an application stub that implements login through twitter. It works great!

The process goes something like:

  1. user clicks a link on your site to login
  2. user is taken to twitter for login, if they are already logged in proceed to the next step
  3. user is asked to allow your application access, they accept or deny (only happens once)
  4. user is taken back to your site, where your site can ask twitter for information about the user (name, screen name, etc) and create a user-profile based on that.

Some helpful links I found:
First, a document on twitter’s site that describes their API and gives a technical overview of the login process.
Second, a document that provides php source code that you can test and read to learn about how to implement OAuth/Twitter login. Example in Php: using Twitter’s OAuth

Comments are closed.