views:

694

answers:

1

Hi, I have to integrate Sign-in-with Twitter in my app as below. http://apiwiki.twitter.com/Sign-in-with-Twitter It is browser based app developed in JavaScript I have been refering google code java script OAuth, but im confused how to use oauth/authenticate and how to get the oauth_token

Can any one please help me out with some samples ?

+1  A: 

Use below code in consumer.js and select example provider in index.html drop down list

consumer.example =
{ consumerKey   : "your_app_key"
, consumerSecret: "your_app_secret"
, serviceProvider:
  { signatureMethod     : "HMAC-SHA1"
  , requestTokenURL     : "https://twitter.com/oauth/request_token"
  , userAuthorizationURL: "https://twitter.com/oauth/authorize"
  , accessTokenURL      : "https://twitter.com/oauth/access_token"
  , echoURL             : "http://localhost/oauth-provider/echo" 
  }
};
Swar