Hi there CogDogBlog readers. Alan went outside and has been gone a while, but he left his laptop open. I see him blogging here all the time and thought I would give it a try.
Yes, I am Felix. Maybe you have seen one of my 600 photos Alan has posted on flickr this year? Every time I look up, he has a camera in my face.
So I first made an account for myself in his blog. Easy peasy. WordPress is simpler than chewing bones.
Now I am combing through his tweets and saw this message when Alan said something about taking me for a walk.
— Paul-Olivier Dehaye (@podehaye) December 22, 2016
Hey Paul-Oliver! I have way more than one follower, my twitter account HAS 24!
There’s not much action in my stream. I can only tweet when Alan leaves the room and if his phone is unlocked.
But I have this laptop open and the whole internet lays open before me!
What if I could rig up a bot thing that could tweet out each time he posts a photo of me to flickr? The photos are all tagged “felix”.
I bet I could do something with ifttt — dogs get logical expressions, BTW– like “If I sit down and look pitifully bored, then Alan will get me a bone from the freezer.”
But I cannot use Alan’s flickr login as a trigger; I don’t know his password, and he is already logged into IFTTT with his credentials.
Is that a squirrel outside?
FOCUS FELIX, FOCUS!
Okay, I wonder if I can get to his flickr photos via RSS. Almost no one gets RSS, but me and Alan do. But oh, does flickr make its feeds hard to find! You have to dig and dig…
But I go to his flickr page, and since he is logged in, way on the right side, under the nebulous
More menu, I click
And ZOMG! I chase my tail around. This is cool. It’s like doing time travel to the way flickr looked in 2009! Check it out…
But this page is old fashioned page, so it’s only about two scrolls to the bottom, where I can smell a rare flickr RSS feed. Mighty rare.
And this is the feed for all of his photos
But I don’t want to tweet all his boring photos of leaves and rocks and old toys, I just want my photos. When I google for Flickr RSS Feeds I get to some API spec page in their Garden.
Then I paw around the links and look at the spec for Public Feeds — there is a query string parameter for
tags. Hmmm. Tags are really really powerful.
I am just going to put on my URL guessing hat (oh yeah, I don’t wear hats. IT’S A METAHPHOR HUMANS!). I slip in a
&tags=felix into the URL
And bingo! I can see in the RSS Feed (so easy to read!) That its just photos of me. This is the best feed in flickr. It’s like raw yummy meat.
I am a smart dog and do not want to leave any cookie crumbs, so Open a new incognito window in Chrome; this way I am not using Alan’s cookies nor leaving my own. I do have to create an IFTTT account, but that’s easy. And I know where I can find my mail in Alan’s messy gmail pile.
Creating applets is easier than knocking over a box of cereal!
My IF condition uses RSS, and I enter that yummy feed
For the THEN, I use the twitter one for doing a tweet with a photo (making sure I am already logged in to twitter), and I can then use the information the feed provides to populate my tweet, like the title of the photo
EntryTitle and for the image, the aptly name
EntryImageURL (you don’t need a degree to figure out that).
Well, that was it. I heard Alan’s tell-tale footsteps outside, so quickly closed by incognito window, and resumed my usual position of sleeping on the couch.
I had to wait a few hours until Alan looked over and took my photo (I tried to look pathetically bored), and was glad to see he sent it to flickr right away.
An hour later while he was in the bathroom (what does he do in there for that long? Humans are weird..)
I was able to refresh my twitter page.
— Felix (@felixadog) December 23, 2016
The photo he had posted to his flickr account and tagged felix was tweeted out to my account. Genius!
Now I am tweeting automatically! I just have to get him to take more photos of me.
That is easy.
Hooking together things on the web is so easy if you got some ideas how it all works together.
The post "Guest Post: Can I Auto Tweet Alan’s Photos of Me?" was originally squeezed out of the bottom of an old rusted tube of toothpaste at CogDogBlog (http://cogdogblog.com/2016/12/felix-tweets/) on December 22, 2016.