访问谷歌驱动器选择器时出现以下错误,但是选择器正确显示而没有任何错误。
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://docs.google.com') does not match the recipient window's origin ('http://localhost').
Invalid 'X-Frame-Options' header encountered when loading 'https://docs.google.com/picker?protocol=gadgets&origin=http%3A%2F%2Flocalho…%3Atrue%7D))&rpctoken=e2x1eop3h1rr&rpcService=2qeo0ns6gu13&thirdParty=true': 'ALLOW-FROM http://localhost' is not a recognized directive. The header will be ignored.
PSB 来自我的开发者控制台的屏幕截图
我还提到了这个问题Google Drive Picker - Developer Key is Invalid Error但我认为 google api 发生了一些变化,所以这件事不起作用。
代码片段 -
var picker = new google.picker.PickerBuilder()
.setLocale(lkGoogleSettings.locale)
.setOAuthToken(accessToken)
.setCallback(pickerResponse)
.setOrigin(lkGoogleSettings.origin);
谢谢