title: How do I get Instagram posts from several accounts?
body: <p>I would like to show the latest instagram posts from three different instagram users in one app. I control the instagram accounts, so it wouldn't be a problem to use APIs that require the user to accept access.</p>
  <p>One method would be to add ?__a=1 at the end of their profile to get at json that contains this information, show the title as text in my app and load the picture from Instagram's CDN.</p>
  <p>From what I can see, this isn't allowed by Instagram's terms, so I could easily see them banning the whole thing after some time.</p>
  <p>Using Instagram's APIs (both Basic Display API or Graph) looks doubtful in an app, since they are based on tokens that should be kept server side.</p>
  <p>Potentially I can configure a backend that does nothing but get the content, stores it with the single purpose of pushing it forward. I would think even this is against Instagram's terms, and sounds a bit over-kill.</p>
  <p>Is there any methods I've missed?</p>
  <p>(The Bot asked for some code, here's the JS I cannot use..)</p>
  <pre><code>    function viewInsta(input_url) {
  var url = input_url;
  const p = url.split(&quot;/&quot;);
  var t = '';
  for (let i = 0; i &lt; p.length; i++) {
  if(i==2){
  t += p[i].replaceAll('-', '--').replaceAll('.','-')+atob('LnRyYW5zbGF0ZS5nb29n')+'/';
  } else { if(i != p.length-1){ t += p[i]+'/'; } else { t += p[i]; } }
  }
  // document.getElementById(this.id).src = encodeURI(t);
  return '&lt;img src=&quot;'+encodeURI(t)+'&quot;&gt;';
  }
  
  
  var request = new XMLHttpRequest();
  request.open(&quot;GET&quot;, &quot;instagram.json&quot;, false);
  request.send(null)
  var my_JSON_object = JSON.parse(request.responseText);
  var node_objects =  my_JSON_object.graphql.user.edge_owner_to_timeline_media.edges;
  
  node_objects.forEach(alert_function);
  
  function alert_function(value){
  var url_array = value.node.thumbnail_src.split('?');
  var url = url_array[0];
  document.getElementById(&quot;div1&quot;).innerHTML += value.node.thumbnail_src + viewInsta(value.node.thumbnail_src) + '&lt;hr&gt;';
  console.log (value.node.thumbnail_src);
  }
  </code></pre>