javascript - 请求的资源上不存在 'Access-Control-Allow-Origin' header 。 - Pinterest oauth 实现

标签 javascript angularjs oauth cors pinterest

我正在为 pinterest 实现 oauth 并能够获取访问代码,但是当我尝试执行 GET/v1/me/ 时,我在 chrome 控制台中收到此错误 -

XMLHttpRequest cannot load https://api.pinterest.com/v1/me?oauth_token=XXXXX&v=20121125. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:3000' is therefore not allowed access.

一般来说,我知道它与服务器端启用 CORS 的 header 设置有关,但我想具体知道如何使其适用于 pinterest。

最佳答案

似乎您尚未在 pinterest 开发人员部分将您的 URL ( https://localhost:3000 ) 列入白名单,该部分要求您指定重定向 URL。 希望这有帮助!

关于javascript - 请求的资源上不存在 'Access-Control-Allow-Origin' header 。 - Pinterest oauth 实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36559308/

相关文章:

html - div 的 CSS 高度和 Angular UI 路由

php - Oauth 2 $client->getAccessToken() 返回空值

api - 未经用户许可的 API 的 OAuth 设计

oauth - 如何更改 google API "service account"名称/电子邮件地址

javascript - Jquery 选择以 ID 为条件的表单项

javascript - 将 Parantsis 之间的字符串插入数组数组时遇到问题

javascript - 如何在 Canvas 中移动对象时设置onclick事件?

javascript - 这是 Internet Explorer 8 的 onpropertychange 事件的错误吗?

angularjs - 在普通 html 页面中使用 Angular Material

angularjs - 使用 AngularJS 和 $resource 保存新模型