Instagram API - Custom Photos

Does anyone know I can get photos from an Instagram user without using an access token. It doesn't make sense that I see photos on http://instagram.com/ {user}, but I can’t get them using the Instagram API.

thanks

+5
source share
5 answers

No, I do not think this is possible using their api.

From instagram documentation: ( http://instagram.com/developer/authentication/ )

Authenticated requests require access_token .... We only need authentication in cases where your application executes requests on behalf of a user (comments, suggestions, viewing a user feed , etc.).

You could work out some kind of hack. Here's a PHP implementation using followgram.me http://www.barattalo.it/2011/08/18/how-to-use-instagr-am-photos/

+1
source

You do not need to use access_token . Just register your application on Instagram, get client_id and use it for the request.

To bring the documentation:

Please note that in many situations you may not need to authenticate users at all. For example, you can request popular photos without authentication (i.e. you do not need to provide access_token; just use your client ID with your request) . We only need authentication in cases where your application makes requests on behalf of the user (commenting, liking, viewing the user feed, etc.).

+1
source

you do not need to use access_token to get photos. just call:

 https://api.instagram.com/v1/users/{user-id}/media/recent?callback=&client_id={client_id} 

You can create your client_id here:

https://instagram.com/developer/clients/manage/

+1
source

Hello, I have an example to get a user image. Please follow the code

 /* 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); 

I have a Refferece of Get Custom Media or Image in Your Instagram Example

0
source

There are two ways to get data.

1) client side - you need to specify client_id

2) server - you need to provide access_token

 https://api.instagram.com/v1/users/#{instagram_id}/media/recent/?access_token=#{@token}" 

this will give you a recent uploaded photo of this user whose instagram_id is listed ...

0
source

All Articles