This cannot be done directly. The Instagram API itself does not allow you to make such a call: you need to either request specific user photos or request a tag, and the gem does not provide a workaround.
So first, request the user:
@results = Instagram.user_recent_media(1907035, {access_token: t.token, count: 60})
Then save the photos with the desired tags. In the results, each element has an array of "tags". For example, @results.first["tags"]
returns an array of tags for the first photo.
Here's some well-documented code for creating typical queries:
https://github.com/Instagram/instagram-ruby-gem/blob/master/lib/instagram/client/users.rb
source share