I'm using this great library to make oauth authentication :
https://oauth.io/docs/mobiles
and by this code (written in router function) :
OAuth.initialize('FUxf14**YBrE');
//Using popup (option 1)
OAuth.popup('instagram', function(error, result) {
//handle error with error
//use result.access_token in your API request
console.log(error);
});
This code should open a pop-up but console.log(error) tell me:
message: "Could not open a popup"
Why it can't open a pop-up?
The popup is probably blocked by the browser.
To prevent that, make the call to OAuth.popup only inside a click event handler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With