所以,问题在于当用户进行点击等操作时弹出窗口被阻止打开。
gapi.auth.authorize({
client_id: this.client_id,
scope: this.scopes,
access_type: 'online',
immediate: immediate
}, function(authResult) {
console.log(authResult)
});
如果我只是像这样在用户点击时打开窗口:
$('.some').click(funciton(){
window.open(someurl)
})
它运行良好,但如果我通过gdrive api(gapi.auth.authorize)执行它,那么无论如何都会被阻止。
这是必须的,我不能强迫用户关闭弹出窗口阻止功能。 我希望有人现在可以解决它:),谢谢。