I'm using oauth.io to handle authorization of users' Twitter accounts to pull data from the Twitter API. I use the code exactly as in the demo, inserting my public key and using 'twitter' as the provider:
OAuth.initialize('key'); //OAuth.io public key
OAuth.popup('twitter')
.done(function (result) {
// Perform API calls
console.log(result);
})
.fail(function (error) {
// Handle errors
});
When I open the page, a popup window opens, but then closes immediately before I can see anything or diagnose what's going wrong.
I read this answer but it didn't seem to address the issue of the popup closing, just that the author needed to include jQuery, which I've already done.
Questions:
- Is there anything I might have done wrong in configuring or setting up my apps, either on oauth.io or Twitter?
- Is there a way to diagnose what's happening in the popup between when it opens and closes?