Git Product home page Git Product logo

meteor-accounts-instagram's Introduction

Hi there 👋

Twitter

  • ❤️ I love sailing⛵️, reading📚 and cooking🍳
  • 🌱 I’m currently learning Wing foiling 🌬️🏄‍♂️
  • 📫 Reach me at: email | Schedule 15 mins call

meteor-accounts-instagram's People

Contributors

ajduke avatar andfs avatar bengott avatar justindra avatar mrcoles avatar pradel avatar yubozhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meteor-accounts-instagram's Issues

Is this project still maintained?

I'm trying to add the package on Meteor 2.3.4 (Windows 10) and getting constraint conflicts for accounts-base, is this project still maintained?

Scope configuration not respected on login

Even when I specify that I want the scope to be public_content the authorization url includes scope=likes+comments+relationships+basic. It is like my scope config is entirely ignored.

How to get token??

Hello,

how to and where I can get token??

And also how to insert more data into user collection once user logged in successfully?

Thanks.

scopes do not work

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'
});

Accounts.loginServiceConfiguration.insert({
  service: 'instagram',
  clientId: 'CLIENTID',
  secret: 'SECRET',
  scope: ['basic','public_content']
});

});
}

Not able to login to instagram

Hi,

On server side, here i did following configuration -

ServiceConfiguration.configurations.remove({
  service: "instagram"
});
ServiceConfiguration.configurations.insert({
  service: "instagram",
  clientId: "<my-client-id>",
  secret: "<my-secret>"
});

and on button click i am doing following -

    Meteor.loginWithInstagram((err, res)->
      console.log 'login failed '+err
    )

After i click on button, event is fired and i get consent screen for instagram after that i authenticate then window disappears but i get following error on server console
Thus not able to login

W20141115-00:03:38.226(5.5) (oauth_server.js:78) Unable to parse state from OAuth query: îÞ��»>üô¡æz±´��Ü�à�õ2#IWÅÀ?¶²U9·
W20141115-00:03:38.234(5.5) (oauth_server.js:78) Unable to parse state from OAuth query: îÞ��»>üô¡æz±´��Ü�à�õ2#IWÅÀ?¶²U9·
W20141115-00:03:38.235(5.5) (oauth_server.js:78) Unable to parse state from OAuth query: îÞ��»>üô¡æz±´��Ü�à�õ2#IWÅÀ?¶²U9·
W20141115-00:03:38.236(5.5) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with Instagram. failed [400] {"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI doesn't match original redirect URI"}
I20141115-00:03:38.667(5.5)? Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Instagram. failed [400] {"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI doesn't match original redirect URI"}
I20141115-00:03:38.668(5.5)?     at getTokenResponse (packages/bozhao:accounts-instagram/instagram_server.js:50)
I20141115-00:03:38.668(5.5)?     at Object.ServiceConfiguration.configurations.findOne.service [as handleOauthRequest] (packages/bozhao:accounts-instagram/instagram_server.js:5)
I20141115-00:03:38.668(5.5)?     at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:8)
I20141115-00:03:38.669(5.5)?     at middleware (packages/oauth/oauth_server.js:173)
I20141115-00:03:38.669(5.5)?     at packages/oauth/oauth_server.js:146

Can you look into it and let me know.

Thanks,
ajduke

Can't login

After all configurations I've got this message when I try to login:
{"code": 400, "error_type": "OAuthException", "error_message": "Invalid scope field(s): b,a,s,i,c"}

Did I forget something maybe?

loginWithInstagram returns undefined

Hey,

in the README example step 6) you're using:

Meteor.loginWithInstagram(function (err, res) {
      if (err !== undefined)
        console.log('sucess ' + res)
      else
        console.log('login failed ' + err)
  });

This will output login failed also when the login succeeded, because both err and res are undefined.

From what I can tell, the function never returns anything: https://github.com/yubozhao/meteor-accounts-instagram/blob/master/instagram.js

I am not that familiar with the accounts system, but I suppose this might be an easy fix - or amend to the README omitting this instruction, at the very least :)

Thanks for the great package!

Set Meteor Username when Signing Up?

Hello, wondering the best way to set the actual username in meteor when signing up with Instagram? It sets the profile.name field but not the profile.username

thanks

Broken experience in mobile iOS

I'm using this package to authenticate users for Instagram and it's not a very good experience on iOS browsers (have not tested Android). The app pops up the login module, and after login reads:

"Login completed. Click here to close this window."

However, the app never gets the authentication. In addition, the "Click here" link doesn't close the window, so the user is stuck in limbo as it says the URL is my domain so they would expect to refresh but nothing will happen.

I tried adding the loginStyle: "redirect" option as explained in Meteor oauth docs but that doesn't seem to change anything, it still pops up a new window.

Any idea what's going on here?

scope in auth flow

Is there any reason why you didn't include the scope in the auth request?

Is it functional and was it ever published ?

Hi,

Not really an issue, but I wasn't able to find out if you ever managed to get this working and publish it to the new package system ?
I have to get instagram oauth login setup for a project of mine so I'll eventually dig into the code, just wanted to know the status of your fork of the original contributor.

Best,

default icon

Thanks so much for writing this package, @yubozhao, super helpful!

Is it possible to change the default image that comes with the login button when the accounts-ui package is in use? Right now its an S of some sorts (see attached).

Thanks!

screen shot 2015-04-06 at 2 10 11 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.