You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error whenever I try to use a scope:
{"code": 400, "error_type": "OAuthException", "error_message": "Invalid scope field(s): p,u,b,l,i,c,_,c,o,n,t,e,n,t"}
Here's what my code looks like:
ServiceConfiguration.configurations.insert({
service: 'instagram',
scope: "public_content",
clientId: 'CLIENTID_HERE',
secret: 'SECRET_HERE'
});
Authentication works if I remove the scopes line, but then I don't have the scope. I am baffled, please help!
Thanks
FIXED
Here is the code I ended up using in server/accounts.js and it works now!
if (Meteor.isClient) {
Template.hello.events({
'click button': function () {
// increment the counter when button is clicked
Session.set("counter", Session.get("counter") + 1);
Meteor.loginWithInstagram({
loginStyle: 'popup',
requestPermissions: ['basic','public_content']
//loginStyle: 'redirect' you can use redirect for mobile web app
}, function () {
console.log('in call back', arguments);
});
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
Accounts.loginServiceConfiguration.remove({
service: 'instagram'
});
I get this error whenever I try to use a scope:
{"code": 400, "error_type": "OAuthException", "error_message": "Invalid scope field(s): p,u,b,l,i,c,_,c,o,n,t,e,n,t"}
Here's what my code looks like:
ServiceConfiguration.configurations.insert({
service: 'instagram',
scope: "public_content",
clientId: 'CLIENTID_HERE',
secret: 'SECRET_HERE'
});
Authentication works if I remove the scopes line, but then I don't have the scope. I am baffled, please help!
Thanks
FIXED
Here is the code I ended up using in server/accounts.js and it works now!
if (Meteor.isClient) {
Template.hello.events({
'click button': function () {
// increment the counter when button is clicked
Session.set("counter", Session.get("counter") + 1);
Meteor.loginWithInstagram({
loginStyle: 'popup',
requestPermissions: ['basic','public_content']
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
Accounts.loginServiceConfiguration.remove({
service: 'instagram'
});
});
}
The text was updated successfully, but these errors were encountered: