Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diogomachado/d76ac14f4aa6ebfa71f9ac28444233fa to your computer and use it in GitHub Desktop.
Save diogomachado/d76ac14f4aa6ebfa71f9ac28444233fa to your computer and use it in GitHub Desktop.
Instagram captura imagens hashtag.
// Para obter o token
// $json = file_get_contents("https://instagram.com/oauth/authorize/?client_id=33ba683f581e4c8faefd4cd38d948131&redirect_uri=http://www.sofisticatta.dev&scope=public_content&response_type=token");
// $data = json_decode($json);
// dd($data);
// die();
// $json = file_get_contents("https://api.instagram.com/v1/tags/looksofisticatta/media/recent/?access_token=311684193.33ba683.9dae3610190549e0aa1bf6caa41c065b");
// $data = json_decode($json);
// // to get the array with all resolutions
// $images = array();
// foreach( $data->data as $user_data ) {
// $images[] = (array) $user_data->images;
// }
// dd($images);
// die();
// // print_r( $images );
// // to get the array with standard resolutions
// $standard = array_map( function( $item ) {
// return $item['standard_resolution']->url;
// }, $images );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment