I want to get all the pictures with a specific hashtag from Instagram using API in Android. How can I do that?
Is there any pre developed Example for this?
- 6 years ago
https://api.instagram.com/v1/tags/SOMETAG/media/recent?client_id=CLIENT_ID
It is not possible yet to search for content using multiple tags, for now only single tags are supported.
Firstly, the Instagram API endpoint "tags" required OAuth authentication.
This is not quite true, you only need an API-Key. Just register an application and add it to your requests. Example:
https://api.instagram.com/v1/users/userIdYouWantToGetMediaFrom/media/recent?client_id=yourAPIKey
Also, note that the username is not the user-id. You can look up user-id's here.
A workaround for searching multiple keywords would be if you start one request for each tag and compare the results on your server. Of course, this could slow down your site depending on how much keywords you want to compare.
- 6 years ago
Direct the user to our authorization URL.
CLIENTID, redirect URI and secrate Key will get after create client by click here.
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token&scope=likes+comments +public_content
Here are the scopes we currently support:
User Profile Info : Get information about the owner of the access_token
.
https://api.instagram.com/v1/users/self/?access_token=YOUR_ACCESS_TOKEN
Get information about a tag object.
https://api.instagram.com/v1/tags/YOURTAG?access_token=YOUR_ACCESS_TOKEN
Get a list of recently tagged media.
https://api.instagram.com/v1/tags/YOURTAG/media/recent?access_token=YOUR_ACCESS_TOKEN
ACCESS_TOKEN | A valid access token. |
---|---|
MAX_TAG_ID | Return media after this max_tag_id. |
MIN_TAG_ID | Return media before this min_tag_id. |
COUNT | Count of tagged media to return. |
- 6 years ago
Direct the user to our authorization URL.
CLIENTID, redirect URI and secrate Key will get after create client by click here.
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token&scope=likes+comments +public_content
Here are the scopes we currently support:
User Profile Info : Get information about the owner of the access_token
.
https://api.instagram.com/v1/users/self/?access_token=YOUR_ACCESS_TOKEN
Get information about a tag object.
https://api.instagram.com/v1/tags/YOURTAG?access_token=YOUR_ACCESS_TOKEN
Get a list of recently tagged media.
https://api.instagram.com/v1/tags/YOURTAG/media/recent?access_token=YOUR_ACCESS_TOKEN
ACCESS_TOKEN | A valid access token. |
---|---|
MAX_TAG_ID | Return media after this max_tag_id. |
MIN_TAG_ID | Return media before this min_tag_id. |
COUNT | Count of tagged media to return. |
Hot Questions