afifmakarim

snapgram.php

Nov 7th, 2018
1,061
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2. require 'vendor/autoload.php';
  3. Unirest\Request::verifyPeer(false);
  4.  
  5. $instagram = \InstagramScraper\Instagram::withCredentials('your_ig_username', 'your_ig_password', '/path/to/cache/folder');
  6. $instagram->login();
  7. $medias = $instagram->getMedias('9gag');
  8. $id[] = $medias[0]->getOwner()->getid();
  9.  
  10. $stories = $instagram->getStories($id);
  11. $slides = $stories[0]->getStories();
  12. echo "<pre>";
  13. print_r($slides);
  14. echo "</pre>";
Advertisement
Add Comment
Please, Sign In to add comment