carmolim
carmolim

Reputation: 137

No tags return from tag_recent_media

Hello I'm playing with the python instagram API and I'm using this example:

from instagram.client import InstagramAPI

access_token = "YOUR_ACCESS_TOKEN"
api = InstagramAPI(access_token=access_token)

recent_media, next_ = api.tag_recent_media( count = 20, max_tag_id = '', tag_name = 'cats' ) )

for media in recent_media:
    print media.tags  # attempt to get tags associated with each media

When I run it, some times it says that media does not have "tags" attribute. But I'm searching for tag_recent_media, how is possible to the media not have tags?

Any thoughts?

Thanks!

Upvotes: 0

Views: 223

Answers (1)

Pedro Casado
Pedro Casado

Reputation: 1745

Maybe the media doesnt have any tags, and a comment has it?

Try to check that, because a media with tags on comments will also be returned by /recent endpoint.

Upvotes: 1

Related Questions