title: Error occurs while calling Instagram user API. Just died in GET Method
body: <p>I am working on Instagram User API. 'self' API works fine, but '{user_id}' does not work. </p>
  
  <p>Here is their API DOC. <a href="https://www.instagram.com/developer/endpoints/users/" rel="nofollow">https://www.instagram.com/developer/endpoints/users/</a></p>
  
  <p>This is my ajax code to get user information.</p>
  
  <pre><code>function setInstagramLogin(btnId, userId){
      var target = document.getElementById(btnId);
      var user = (userId == null || typeof userId == 'undefined') ? 'self' : userId;
      target.addEventListener('click', function(){
          var loginUrl = 'https://api.instagram.com/v1/users/' + user + '/?callback=?';
          console.log(loginUrl);
          $.getJSON(loginUrl, access_parameters, function(instagramData){
              console.log(instagramData);
              var userInfo = instagramData.data;
              alert('Your Information\n username [ ' + userInfo.username + ' ]\n'
                      + 'profile Photo [ ' + userInfo.profile_picture + ' ]\n');
          });
  
      }, false);
  }
  </code></pre>
  
  <p>And from jsp, I call like ...</p>
  
  <pre><code>setInstagramLogin('loginBtn');
  setInstagramLogin('loginBtn', 'jygood');
  </code></pre>
  
  <p>The first one, call 'self' works, the other does not.
  How can I fix this?</p>
  
  <p>The error happens inside of callback jQuery I guess.
  Here is chrome inspector error</p>
  
  <blockquote>
    <p>GET
    <a href="https://api.instagram.com/v1/users/jygood/?callback=jQuery21109406823019962" rel="nofollow">https://api.instagram.com/v1/users/jygood/?callback=jQuery21109406823019962</a>…s_token=211611405.1677ed0.4e0e854196454874b858e21c293b919d&amp;_=1450936187539</p>
    
    <p>send @ jquery-2.1.1.min.js:4</p>
    
    <p>n.extend.ajax @ jquery-2.1.1.min.js:4</p>
    
    <p>n.(anonymous function) @ jquery-2.1.1.min.js:4</p>
    
    <p>n.extend.getJSON @ jquery-2.1.1.min.js:4</p>
    
    <p>(anonymous function) @ instagram.js:29</p>
  </blockquote>
  
  <p>line29 is <code>$.getJSON()</code> part of first script.</p>
  
  <p>Thanks!</p>