Automatic post to Twitter
Blot.im does not have a feature to automatically posting a notification of a new blog post to for instance Twitter. And based on the following tweet from David, it is not something that will be (ever) added to Blot.im
https://twitter.com/lllIIlIlIl/status/712717710027718656
But David also noted you can easily set this up using your blog’s RSS-feed, using services like IFTTT or twitterfeed.com
https://twitter.com/lllIIlIlIl/status/712717837215748097
I have been thinking for quit some time about automatically post every new blog post onto Twitter, but not all post are something everyone needs to be notified of. With the standard RSS-feed it is an all-or-nothing
-approach. This is a job for the custom metadata feature of Blot.im
Added special RSS-feed for posting to Twitter
In your design add a new view, in my case I named it tweetfeed.xml
(.xml to ensure the proper content-type is used). As URL I specified /tweetfeed.rss
.
The following code is used as the template code (basically the same code as feed.rss
, but with custom metadata added and the description field removed);
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>{{title}}</title>
<link>{{blogURL}}</link>
<description>The feed of updates to {{name}}'s blog.</description>
<updated>{{updated}}</updated>
<id>{{blogURL}}</id>
<author>
<name>{{name}}</name>
</author>
{{#recentEntries}}
{{#metadata.twitter}}
<item>
<title>{{title}}</title>
<link>{{blogURL}}{{url}}</link>
<guid>{{blogURL}}/{{id}}</guid>
<pubDate>{{dateUTC}}</pubDate>
</item>
{{/metadata.twitter}}
{{/recentEntries}}
</channel>
</rss>
By using the {{#metadata.twitter}}
only posts that have the metadata tag ‘Twitter: Yes’ (The value Yes
has no actual meaning, it could be anything) will be included within this RSS-feed. For this post the heading is as follows
Date: 2016-03-28
Permalink: automatic-post-to-twitter
Tags: Blot, Twitter, IFTTT
Twitter: Yes
Which results in the following RSS feed to be generated
<rss version="2.0">
<channel>
<title>Shared Memory Dump</title>
<link>http://sharedmemorydump.net</link>
<description>The feed of updates to 's blog.</description>
<updated>Thu, 24 Mar 2016 16:15:00 GMT</updated>
<id>http://sharedmemorydump.net</id>
<author>
<name/>
</author>
<item>
<title>Automatic post to Twitter</title>
<link>
http://sharedmemorydump.net/automatic-post-to-twitter-using-ifttt
</link>
<guid>http://sharedmemorydump.net/194</guid>
<pubDate>Thu, 24 Mar 2016 16:15:00 GMT</pubDate>
</item>
</channel>
</rss>
and the following tweet
https://twitter.com/drexore/status/713036435289411585
Linking new RSS-feed to IFFT
If you don’t already have an IFFT-account, you can sign up here, https://ifttt.com/join.
On IFTTT I created a new recipe that uses an RSS-feed for a trigger and Twitter as action.
I have made my IFTTT recipe public, so you can make use of it if you want, just make sure to change the Feed URL to the one for your own blog…