Today I added an option to OwnYourGram to opt in to receiving an h-card as the location property instead of a geo:// URI. On the dashboard, there is a setting to toggle between receiving a geo:// URI with file uploads, and an h-card location with a reference to the Instagram photo URL.
Since Micropub's form-encoded format doesn't support nested objects like h-card, we have to use the JSON format to send that. However in JSON format, we can't upload files, so we need to send just the image URL. Typically, a Micropub client would first upload the photo to the user's Media Endpoint and include the resulting URL in the JSON Micropub request. However since the photo already exists at a URL on Instagram's server, I just skipped the extra upload step and pass the endpoint the Instagram URL.
So if you want to start receiving the location as an h-card, you can opt in to this change on the OwnYourGram dashboard!
Today I added some additional settings to OwnYourGram. You can now configure a whitelist and/or blacklist of keywords to control which of your Instagram posts are imported to your website.
I've been posting my #100DaysOfMusic posts on Instagram and having OwnYourGram post them back to my website, but over the past week I've found some problems with that approach. Instagram videos are limited to 60 seconds, and one of my songs was 90 seconds long. Instagram also runs some pretty heavy compression on the audio, which seems to be optimized for speech, so the music doesn't come through as cleanly as I wanted.
Because of this, what I've been doing is replacing the video on my website after OwnYourGram does the initial import. This workflow ends up being way too complicated, so what I'm going to start doing instead is posting the videos to my website directly. However, I still want to share them on Instagram, but I would end up with OwnYourGram posting another copy of it back to my website.
With the new blacklist setting, now I can blacklist the "#100DaysOfMusic" tag so that OwnYourGram will skip importing those videos. While I was at it, I also added a whitelist in case someone has a use case for that as well. You can use the whitelist and blacklist together to make a rule that imports photos matching a keyword as long as another keyword is not present.
I'd love to hear if you end yup using either of these settings!
Previously, OwnYourGram would check all users' Instagram feeds once an hour. I changed it to have four polling tiers, and the interval for the top tier is every 15 minutes now. This means people who post lots of photos will now see their photos on their site sooner, and because of the tiered approach, I won't be wasting resources on feeds that post infrequently.
The four tiers are:
Users are sorted into tiers based on the number of photos posted in the last 14 days. The more you post, the more often OwnYourGram checks your feed! If your Micropub endpoint returns an error, then you're bumped down a tier. If you're at the lowest tier and there's an error, then polling will be disabled completely until you log back in.
Thanks to snarfed for suggesting the tiered approach!
I finished two updates to OwnYourGram today.
There is a new page when you log in where you can see a list of your 20 most recent photos on Instagram, check whether they've been posted to your website already, and re-post any if you need to!
This is helpful in case that OwnYourGram somehow misses importing any of your photos, or if your Micropub endpoint temporarily returns an error, or when you're initially developing your endpoint and need to test posting photos and videos to it repeatedly.
I also added a "disconnect Instagram" button to the dashboard so you can disassociate your Instagram account if you need to stop importing photos or move to another website.
OwnYourGram is starting to feel much more like a real tool now, and not just a little web wrapper around a cron job!