Hello,
<?php
/* Get image in your instagram Account */
$set_scope_your_app ="https://www.instagram.com/oauth/authorize/?
client_id=Added-your-client_id&
redirect_uri=Added-your-redirect_uri&response_typ
e=code&scope=public_content";
$get_acess_token = "https://instagram.com/oauth/authorize/?
client_id=Added-your-client_id&
redirect_uri=Added-your-redirect_uri&respons
e_type=token";
$url="https://api.instagram.com/v1/users/self/media/recent/?access_token=Added-your-access_token";
$json = file_get_contents($url);
$data = json_decode($json);
$images = array();
foreach( $data->data as $user_data ) {
$images[] = (array) $user_data->images;
}
$standard = array_map( function( $item ) {
return $item['standard_resolution']->url;
}, $images );
echo "<pre>";
print_r($standard);
echo "<pre>";
print_r($standard);
<?php
/* Get image in your instagram Account */
$set_scope_your_app ="https://www.instagram.com/oauth/authorize/?
client_id=Added-your-client_id&
redirect_uri=Added-your-redirect_uri&response_typ
e=code&scope=public_content";
$get_acess_token = "https://instagram.com/oauth/authorize/?
client_id=Added-your-client_id&
redirect_uri=Added-your-redirect_uri&respons
e_type=token";
$url="https://api.instagram.com/v1/users/self/media/recent/?access_token=Added-your-access_token";
$json = file_get_contents($url);
$data = json_decode($json);
$images = array();
foreach( $data->data as $user_data ) {
$images[] = (array) $user_data->images;
}
$standard = array_map( function( $item ) {
return $item['standard_resolution']->url;
}, $images );
echo "<pre>";
print_r($standard);
echo "<pre>";
print_r($standard);
How can I get all the images from perticular account? Right now above code displays 20 images.
ReplyDeleteYou need to submit your application for approval.
DeleteFor that you need to submit your application. Once yours is approved by Instagram then you will get all the photos.
ReplyDeleteDo you got photos of other ig users without their authentication.?
Thanks for the insightful info
ReplyDeleteThanks for the article
ReplyDelete