【发布时间】:2017-06-27 18:34:34
【问题描述】:
我正在尝试构建一个简单的 JavaScript 应用程序,它使用 MediaHound SDK 而不进行转译。这是我得到的错误:
<oauth>
<error_description>
Full authentication is required to access this resource
</error_description>
<error>unauthorized</error>
</oauth>
我按照here 的指示进行操作。我已经在 MediaHound 的应用程序屏幕上配置了应用程序,并且正确配置了客户端 ID 和客户端密码(当我更改它们时,我得到一个不同的错误)。
我包括了 hound.js 和我的主 js 文件:
houndjs.MHSDK.configure('mhclt_Zoetrope', 'My Client Secret is here');
houndjs.MHSearch.fetchResultsForSearchTerm('Gladiator', [houndjs.MHSearch.SCOPE_MOVIE])
.then(response => {
const movie = response.content[0].object;
console.log('First result:', movie.metadata.name);
});
第一行执行良好,是搜索引发了错误。我是否犯了一些明显的错误?
【问题讨论】:
标签: javascript authentication oauth