Last active
          December 19, 2020 12:00 
        
      - 
      
 - 
        
Save hectorromo/2b99f28026e7de93e3a7d5e9229c4c51 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
hectorromo revised this gist
Dec 19, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ <?php // Code taken from this post https://vinkla.dev/blog/fetch-instagram-data-with-php $response = file_get_contents('https://instagram.com/wearestrom/?__a=1'); $user = json_decode($response); $media = $user->graphql->user->edge_owner_to_timeline_media->edges;  - 
        
hectorromo renamed this gist
Dec 19, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. - 
        
hectorromo created this gist
Dec 19, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <?php $response = file_get_contents('https://instagram.com/wearestrom/?__a=1'); $user = json_decode($response); $media = $user->graphql->user->edge_owner_to_timeline_media->edges; // Displays latest post in feed. echo '<a href="https://instagram.com/p/'. $media[0]->node->shortcode .'">'; echo '<img src="'. $media[0]->node->display_url .'" />'; echo '<p>'. $media[0]->node->edge_media_to_caption->edges[0]->node->text .'</p>'; echo '</a>';