Instagrammers

Instagrammers are sucking the life and soul out of travel | Rhiannon Lucy Cosslett by Rhiannon Lucy Cosslett (the Guardian)

You might think social media would diversify the range of images we see, yet the most popular users operate according to a strict schema that takes full advantage of the relevant algorithms (creative, fascinating accounts are still there, but said algorithms make them harder to find). And it’s not just travel – it’s interiors, fashion, weddings, food, children. Social media encourages the memeification of human experience. Instead of diversity we see homogeneity. It’s extremely boring.

The Guardian’s Rhiannon Lucy Cosslett thinks Instagrammers are sucking the life and soul out of travel.

Instagrammers are sucking the life and soul out of travel | Rhiannon Lucy Cosslett by Rhiannon Lucy Cosslett (the Guardian)

You might think social media would diversify the range of images we see, yet the most popular users operate according to a strict schema that takes full advantage of the relevant algorithms (creative, fascinating accounts are still there, but said algorithms make them harder to find). And it’s not just travel – it’s interiors, fashion, weddings, food, children. Social media encourages the memeification of human experience. Instead of diversity we see homogeneity. It’s extremely boring.

[exif id="7278"]

I have noticed that recently I have posted to my Instagram account about once a month. I hardly even look at the stream anymore. I think I’m bored with the platform. So a question for myself, do I need/want Instagram? Do I want my web site to be the only place where I post my images?

Experiment with FourSquare, WordPress and the Keyring Social Importers plugin

Xavier Roy on Twitter by Xavier Roy (Twitter)

“@khurtwilliams Have you tried Keyring Social Importers? It does a pretty good job of importing from Instagram.”

Foursquare import to WordPress with modified Keyring Social Importers code. Thansk to @xavierroy for the suggestion. #IndieWeb #PESOS #Foursquare #WordPress

Xavier Roy on Twitter by Xavier Roy (Twitter)

@khurtwilliams Have you tried Keyring Social Importers? It does a pretty good job of importing from Instagram.”

Update: Developer, Bewu Lebens has written a WordPress: Keyring Developer’s Guide. I will revisit how I used this plugin after I familiarise myself with the guide. I also plan on developing a Keyring importer for Untappd.

On Twitter, Xavier Roy posted a response to my post about my experiment with importing Instagram post to WordPress. He suggested I try the Keyring Social Importers plugin. After some back and forth on Twitter, I gave it a go and updated the original post.

The results were not pleasing. However, I was fascinated by the plugin and tried it with Foursquare.

The Keyring Social Importers plugin provides a set of social importers that pull in content created on other sites and re-publishes it on a WordPress site. After an initial import, the importers optionally check each hour and automatically download new content. New posts are created for each item imported with support for specific Post Formats, depending on the content type.

At the time of writing this, the plugin had not been tested on WordPress 4.9. The untested code can be unstable code and unstable code can lead to security leaks etc. so I configured and tested everything on a test instance of WordPress.

I also installed Keyring, a plugin which is required to use with Keyring Social Importer, and which provides the authentication and API connections to each of the external services. I configured API access to Foursquare and then from the “Tools->Import” section of the dashboard I clicked the link to authenticate and to start importing from Foursquare.

I’ve had my Foursquare account for a very long time so the import took a lot of time. Each check and photo on my Foursquare account was downloaded and imported into my WordPress Media Library. The imported image was attached to each post as a featured image, which is a feature I wanted, however, each image was also attached in the body of every post and is only 640px × 479px.

The importer leverages the Post Kinds and Simple Location IndieWeb plugins to set the Post Kind to Photo and set the geographic location for the post. However, syndication links were not set. But it’s not too much work to set it manually later.

The Foursquare importer works but the results were not attractive. First, I did not want to import every one of my past check-ins. I wanted to limit the initial set of imports. Second, I wanted the higher resolution version of the image.

For example, for check-in at Osteria Procaccini, the Keyring Social Importer imports this image.

I poked around the web and learned that it’s possible to get at this image via the Foursquare API. I discovered that by modifying the image URL and replacing the image dimension with the text original, I could get at the full-size images. But I also discovered that I could get what I wanted by removing some HTML.

What I needed to do was to find the section of code that imports images, and change the code to import the higher-resolution image.

In the wp-content/plugins/keyring-social-importers/keyring-importers.php file, I found the following code between lines 865 to 876. If I removed that code, I would have everything I wanted.


if ( $data ) { $img = ‘<img class="keyring-img" src="' . esc_url( $data[0] ) . '" alt="' . esc_attr( $post['post_title'] ) . '" width="' . esc_attr( $data[1] ) . '" height="' . esc_attr( $data[2] ) . '" />’; } // Regex out the previous img tag, put this one in there instead, or prepend it to the top/bottom, depending on $append if ( stristr( $post['post_content'], $url ) ) { $post['post_content'] = preg_replace( '!<img />]*src=[\'"]' . preg_quote( $url ) . '[\'"][^>]*>!', $img, $post['post_content'] ) . "\n"; } else if ( $append ) { $post['post_content'] = $post['post_content'] . "\n\n" . $img; } else { $post['post_content'] = $img . "\n\n" . $post['post_content']; } }

The default is for Keyring Social Imports to import 200 posts in oldest to newest order. I didn’t want every post and I wanted only one newest post. A modification to line 74 of the wp-content/plugins/keyring-social-importers/importers/keyring-importer-foursquare.php file yielded the results I wanted.

Before:

$url = "https://api.foursquare.com/v2/users/" . $this-&gt;get_option( 'user_id', 'self' ) . "/checkins?limit=200";

After:

$url = "https://api.foursquare.com/v2/users/" . $this-&gt;get_option( 'user_id', 'self' ) . "/checkins?limit=2&amp;sort=newestfirst";

I tested the code over the last few weeks and so far I have not encountered any issues. I think with these modifications to the code, the Keyring Social Importers plugin is a reliable PESOS WordPress plugin for importing Foursquare check-ins.

Experiments with Instagram and WordPress

Experiments with Instagram and WordPress #IndieWeb #Manual #POSSE

[exif id="32699"]

Earlier this year I started using an Adobe Lightroom plugin to export my images directly to Instagram. I also use an Adobe Lightroom to WordPress plugin from Automattic to export images directly to my self-hosted Jetpack-powered WordPress.

It’s a two-step manual process but made easier by the efficiency of getting the images online.

However, neither post was connected to the other. Once I learned about syndication I started perusing the IndieWeb website to find ways to connect images I posted on my website with images I posted on Instagram (or elsewhere). I experimented with a few of these methods.

As a minimum setup for some of these solutions I enabled and configured the following list of plugins:

OwnYourGram

OwnYourGram is a web service that polls your Instagram account, converts your posts to a Micropub request and sends them along with photos to your Micropub endpoint.

I installed the Micropub and IndieAuth plugins for WordPress. IndieAuth is a way to use my own domain name to sign in to websites by linking my website to one or more authentication providers. I setup my website to use IndieAuth, linked it to Twitter, and then I signed into OwnYourGram with my domain.

Once logged into OwnYourGram, I configured the hashtag that would trigger the import and automatic syndication of my post back to my website.

I posted a photo on Instagram and waited. And waited. I did not test how long it took but OwnYourGrown did not post to the website in real time. Growing impatient I manually triggered OwnYourGram. The resulting post had a randomly generated numeral permalink, a randomly generated post date of 31st December 1969, an image in the body instead of the featured image, and badly formatted text, and the post title was blank.

I care about how stuff looks on my website. I care enough that OwnYourGram isn’t the solution for me. For OwnYourGram to be a viable solution for me, I would want the image to be attached to a featured image, Instagram hashtags as WordPress tags, and a URL that was more meaningful.

freedom.io

Another web service that was mentioned on the IndieWeb website was freedom.io. However, when I visited the website I got the following:

This was an app that copied your posts, pictures, and other content from Facebook, Twitter, and Google+ to a blog of your choice. It's down now, but it's open source. So long, and thanks for all the fish!

A link to the source code was provided. I am will not explore this solution further.

Single Photo Bookmarklet

The Single Photo Bookmarklet by Tantek Çelik is a web browser bookmarklet that will extract the Instagram permalink, image URL, image caption and copy them into a text note. I can then create a WordPress post and paste that information into the appropriate fields. It’s a fully manual process.

The bookmarklet works but provides a square formatted image only. This solution useful if you post Instagram infrequently and don’t mind the pain of using a mobile browser to create WordPress posts. If your posts to Instagram frequently this might not be the solution for you.

I didn’t pursue this solution further since my process already involves manually re-creating Instagram posts after creating the original on my website.

DsgnWrks Instagram Importer

I think DsgnWrks Instagram Importer is the solution that Chris Aldrich uses. The plugin allows the user to import Instagram photos to a WordPress site with options to control the imported posts formatting including built-in support for WordPress custom post types, custom taxonomies, post-formats.

But it doesn’t work with WordPress 4.9. and hasn’t been updated in 8 months. I usually don’t run untested code to reduce the likelihood of introducing security vulnerabilities. If a plugin has not been tested on the current (or at least the previous) release of WordPress or hasn’t been updated in a long time, I don’t use it.

But I wanted to see if/how this plugin worked. It didn’t. After trying unsuccessfully for about an hour trying to get the plugin to connect to my Instagram account I visited the plugin support page. Another user has reported that Instagram tokens were being rejected and that the plugin no longer works.

The UI allowed me to authenticate to Instagram. I was able to set the import options. However, once I clicked save, the user tab disappeared from the UI. Changing the import options from manual was not possible. The UI resets.

Installed the DsgnWrks Instagram Importer Debug plugin to help with troubleshooting but was not able to get that to do anything useful and the plugin kept disabling itself after use.

I gave up and moved on.

SNAP Pro

Social Networks Auto Poster {SNAP} from Nextscripts seemed the most promising. This basic WordPress plugin creates syndicated posts to various services including Twitter, Facebook, LinkedIn, Medium, Flickr, etc. and leverages the Bridgy Publishing plugin to link back to the original post on WordPress.

There is a lot to like about SNAP. However, to take advantage of some of the features, including the ability to post to Google+, Pinterest, Instagram, YouTube, Flipboard, etc. purchase of a ($49.95/year) Pro subscription is required. So I did.

It has a number of advanced features including:

  • Scheduled and Delayed posting
  • Filters for posting to each service based on categories, tags, types, etc.
  • Leverages Webmentions to auto-import comments and likes from Instagra, Facebook anf Flickr, and replies and mentions from Twitter as WordPress Comments
  • Post formatting, etc.

It took some tweaking but for a while, I was very happy with the results. And then recently the SNAP Pro service starting having problems posting to Facebook. And then Instagram. Until the issues with Facebook and Instagram are resolved, this solution is dead to me. I have given someone money for a service which I can’t use. Which to put it bluntly, fucking pisses me off.

Keyring Social Importers

Xavier Roy suggested I try using the Keyring Social Importers plugin. This plugin supports a set of social importers that pull in content created on other sites and re-publishes it on your own WordPress site. After an initial import, the importers optionally check each hour and automatically download new content. New posts are created for each item imported with support for specific Post Formats, depending on the content type.

At the time of writing this, the plugin had not been tested on WordPress 4.9. The untested code can be unstable code and unstable code can lead to security leaks etc. so I configured and tested everything on a test instance of WordPress.

I had to also install the Keyring plugin to use with Keyring Social Importers which provides the authentication and API connections to each of the external services. I configured API access to Instagram and then from the "Tools->Import" section of the dashboard I clicked the link to start importing from Instagram.

I've had my Instagram account for just over a year. The importer bombed after importing the most recent Instagram posts but I was able to restart the importer which continued in the background. Each photo on my Instagram account was downloaded and imported into myMedia Library. The imported image was attached to each post as a featured image, which is a feature I wanted, however, each image is only 640px × 479px. I would have preferred to import the 1080 version of the image. I know Instagram support this. The body of the post was set thusly:

<p class="instagram-image"><a href="https://www.instagram.com/p/Bc0Hw30HlOS/" class="instagram-link"><img src="http://104.236.216.66/wp-content/uploads/2017/12/25006240_1693035707385550_7011669385009954816_n.jpg" width="640" height="479" alt="You know what? Sometimes you don’t even need the bandanna.

@troonbrewing Crust Punk Dog is a New England style IPA.

#troonbrewing #crustpunkdog #ale #beer #craftale #ipa" class="keyring-img" /></a></p>
<p class='instagram-caption'>You know what? Sometimes you don’t even need the bandanna.

@troonbrewing Crust Punk Dog is a New England style IPA.

#troonbrewing #crustpunkdog #ale #beer #craftale #ipa</p>

All of the Instagram hashtags were imported as WordPress tags. The importer leverage the Post Kinds and Simple Location IndieWeb plugins to set the Post Kind to Photo and set the geographic location for the post. However, syndication links were not set. That means setting it manually later. I am also disappointed that the entire content of the Instagram caption was used as the title of the post. It's ugly.

The original Instagram post is neat and tidy. The WordPress copy is not.

Keyring Social Importers Instagram Import

My (mostly) Manual Solution

My original workflow involved creating a separate post on my website and on Instagram. But since I started using the IndieWeb and Syndication Links plugins I have adjusted my workflow. For my new workflow, after creating a photo post on my website, I manually post the photo to Instagram, then I copy the Instagram URL and add it as a syndication link on the original WordPress photo post.

  • Original post: https://islandinthenet.com/tired-chasing-perfection/
  • Instagram post: https://www.instagram.com/p/BcmgMfKnN1q/

It’s not an ideal solution but for me, it works better than the other solutions I tried. Ideally, if Nextscripts could fix the problems with SNAP Pro I would switch to that but the cost of the annual subscription is also an issue.

As I stated in an earlier post:

I’m going to use what works and is easy but focus on my content. When it doesn’t work; when it’s not easy. I’ll move on. Try another time.