scottsweb / wp-instagram-widget

❌ A WordPress widget for showing your latest Instagram photos.
115 stars 62 forks source link

Add tag page support #31

Closed scottsweb closed 7 years ago

scottsweb commented 8 years ago

https://wordpress.org/support/topic/hashtag-insted-of-username https://www.instagram.com/explore/tags/hike/

chrisatomix commented 8 years ago

This may be out of scope, but our particular use-case may require Hashtag as well as Username filtering (rather than one or the other). Some Instagram images are not appropriate to display on the homepage of a website, such as instructions for followers or Instagram-specific promotions. Adding both a Username and a Hashtag filter would allow them to only show images from their feed which include the specified hashtag.

scottsweb commented 8 years ago

@chrisatomix do you know if Instagram have a URL where you can view tags from a particular user? If not I think it will be more tricky and it would have to work like the video filter does (providing we can get the tags of an image). This would make it temperamental though because we might have 0 images tagged within the first 12 that Instagram return.

The change above requested in the issue should be relatively easy. It should just be a case of changing the URL we scrape and allowing a username to start with @ and a hash tag to start with #.

chrisatomix commented 8 years ago

After doing some research I think you're correct, it would be very tricky and potentially unreliable to add triple filtering of the results (username + hashtag + exclude videos). Implementing that properly would require the Instagram API (with OAuth authentication, rate limits etc) and therefore exceeds the scope of this plugin. If our clients request that level of control we'll need to implement it, but until then it's unnecessary.

scottsweb commented 7 years ago

Give this PR a spin: https://github.com/scottsweb/wp-instagram-widget/pull/57