I want to integrate twitter login to validate user in my hybrid application using Cordova Oauth plugin, followed the instruction from ngcordova oauth.
And demonstrat
Have created a working twitterExample and uploaded in github. Please take a look
Have added the steps below for quick reference.
Pre-requisites
Create a twitter app and get Consumer Key (API Key) and Consumer Secret (API Secret).
Steps
1) Create a project
2) cd into the project
3) Add the required platform(s)
4) Download "ng-cordova.min.js" and add to js folder
5) Add the "ng-cordova.min.js" path in "index.html" file just above "cordova.js" path
6) Add the dependancy "ngCordova" in "app.js" angular module
7) Add the plugin "cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git" from terminal
8) Download the "sha1.js" file and add to js folder
9) Add the "sha1.js" path in index file
10) Type "bower install ng-cordova-oauth -S" from terminal
11) Add the "ng-cordova-oauth" file path to index file
12) Include "ngCordovaOauth" dependancy in "app.js" angular module
13) Add the "$cordovaOauth" to the controller which is using twitter login function
14) Add the controller and ng-click in index.html
15) Add the twitter login function in the controller as show in the app.js (Please replace the api_key and api_secret with your twitter app details)
Thanks to Nic Raboy for the plugin and blog.
i used http://127.0.0.1:8080/callback when creating the twitter application and it worked