【发布时间】:2016-09-08 01:56:02
【问题描述】:
我正在使用https://github.com/meteor-helium/instagram 包来处理 Instagram 登录。
在我的 server/social-config.js 中,我有
ServiceConfiguration.configurations.remove({
service: 'instagram'
});
ServiceConfiguration.configurations.insert({
service: 'instagram',
clientId: '****',
secret: '****'
});
在我的 client/main.html 中,我有
<template name="login">
{{#if currentUser}}
<button id="logout">Logout</button>
{{else}}
<button id="instagram-login" class="btn btn-default"> Login with Instagram</button>
{{/if}}
</template>
在我的 client/main.js 中,我有
Template.login.events({
'click #instagram-login': function(event) {
Meteor.loginWithInstagram({}, function(err){
if (err) {
throw new Meteor.Error("Instagram login failed");
}
});
},
'click #logout': function(event) {
Meteor.logout(function(err){
if (err) {
throw new Meteor.Error("Logout failed");
}
})
}
});
单击“使用 Instagram 登录”按钮时出现以下错误
Error in OAuth Server: Failed to complete OAuth handshake with Instagram. failed [400] {"code": 400, "error_type": "OAuthException", "error_message": "Invalid Client Secret"}
【问题讨论】: