2017-08-02 11 views
3

私はhello.jsでinstagramにログインしようとしましたが、https://api.instagram.com/oauth/authorizeには決して送られませんでした。そうしないと、直ちに私のリダイレクトURLに向かうので、アクセストークンを取得できません。ここに私のコードは次のとおりです。instagram login with hello.js

hello('instagram').login({redirect_uri : instagram_redirect_url, 
    scope: 'basic, publish'}, function(e){ 
       if(e.error){ 

       }else{ 
        var instagram_access_token = 
    hello('instagram').getAuthResponse().oauth_token; 
        var instagram_secret = 
    hello('instagram').getAuthResponse().oauth_token_secret; 
        console.log(instagram_access_token); 
        console.log(instagram_secret); 
       } 
      }); 
    hello.init ({ 
     instagram: instagram_client_id 
    }); 
+0

解決策を見つけましたか? – Manolo

答えて

0

私はtokenresponse_typeを変更しなければならなかったことがわかった:

hello.init(
    { 
     instagram: INSTAGRAM_ID 
    }, 
    { 
     redirect_uri: helloOAuthCallback, 
     popup  : { 
      location: 'no' 
     }, 
     oauth_proxy : oauthproxy_url, 
     response_type: 'token' 
    } 
); 

は、今では私のために動作します。