Working with Tags in Instagram

This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Tags in Instagram


[ Overview ] [ Operation details ] [ Sample configuration ]


Overview

The following operations allow you to work with tags in Instagram.Click an operation name to see details on how to use it. For sample proxy service which illustrates how to deal with tags,see Sample configuration.

Operation

Description

getTagInfo

Retrieves information about a tag object.

getTagRecent

Retrieves a list of recently tagged media.

tagSearch

Search for tags by name.

Operation in details

This section provides further details on the operations related to tags.

Retrieving Tag  Information    

The getTagInfo  operation is used to retrieve information about a particular tag object.Tag ID is needed for this operation.

getTagInfo
<instagram.getTagInfo> <tag_name>{$ctx:tag_name}</tag_name> </instagram.getTagInf>
Properties
  • media_id  : Specifies the Media  id.

Sample request

Following is a sample request that can be handled by the getTagInfo operation.

Sample Request for getTagInfo
{ "access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d", "media_id":"3" }
Related API documentation

http://instagram.com/developer/endpoints/likes/#get_media_likes

Retrieve Recent Tags

The getTagRecent operation is used to retrieve a list of recently tagged media.

getTagRecent
<instagram.getTagRecent> <tag_name>{$ctx:tag_name}</tag_name> <min_id>{$ctx:min_id}}</min_id> <max_id>{$ctx:max_id}</max_id> </instagram.getTagRecent>
Properties  
Sample request

Following is a sample request that can be handled by the getTagRecent operation.

Sample Request for getTagRecent
{ "access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d", "tag_name":"nofilter", "min_id":"0", "max_id":"1" }
Related API documentation

http://instagram.com/developer/endpoints/tags/#get_tags_media_recent

Searching Tag     

The tagSearch  operation is used to search for tags by name.

tagSearch
<instagram.tagSearch> <query>{$ctx:query}<query> </instagram.tagSearch>
Properties
  • query  : Specifies the search query.

Sample request

Following is a sample request that can be handled by the tagSearch operation.

Sample Request for tagSearch
{ "access_token":"1392352686.f59def8.8093ea32008743cb8f4275eb20c5423d", "query":"snowy" }
Related API documentation

http://instagram.com/developer/endpoints/tags/#get_tags_search

Sample configuration

Following is a sample proxy service that illustrates how to connect to Instagram and use the tagSearch operation.The sample request for this proxy can be found in Sample Request for tagSearch. You can use this sample as a template for using other operations in this category.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="instagram" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="access_token" expression="json-eval($.access_token)"/> <property name="query" expression="json-eval($.query)"/> <instagram.init> <access_token>{$ctx:access_token}</access_token> </instagram.init> <instagram.tagSearch> <query>{$ctx:query}<query> </instagram.tagSearch> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <description/> </proxy>