I am implementing Twitter oAuth in Backbonejs and Nodejs. I have Node api calls
app.get('/api/auth/twitter', function(req, res){});
app.get('/api/auth/twitter/callback', function(req, res, next){});
If I make the call directly from my browser, then I can get a callback from Twitter.
If I have a direct link in my html
<a href="/api/auth/twitter">Login with Twitter</a>
Then I get a call back. But do not know how to return to Backbone model
But if I use the Model-View method of Backbonejs, then nothing...
window.SignInWithTwitterModel = Backbone.Model.extend({
url: function(){
return '/api/auth/twitter';
},
defaults: {
loggedInStatus: false,
user_id: ''
}
});
I just call
this.model.fetch();
Please help....