Adding Simple Twitter Response Buttons to WordPress Posts

Simple Twitter UI buttons on an IndieWeb-enabled site can allow Twitter to become part of your commenting system.

Back at IndieWebCamp Austin, I became enamored of adding additional methods of interacting with my website, particularly for those who weren’t already on the IndieWeb train. I’d seen these types of interactions already on Tantek Çelik’s site in the past, so naturally I figured I would start there.

Web Actions

Some basic searching revealed that in IndieWeb parlance, these types of functionalities are known as web actions. While they’re often added to make it easier for one site with the proper infrastructure to interact with another, they’re also designed for social web silos (Like Twitter, Facebook, et al.) to do this type of interaction simply as well.

As a small scale experiment, I thought I would begin manually and add some simple interface to allow Twitter users (who may not yet have their own websites to use to respond to me instead) to be able to quickly and easily reply to, repost, or like posts on my site. A little bit of reading on the wiki and Twitter’s developer site allowed me to leverage something into existence pretty quickly.

Interestingly, although there are many plugins that help users simply share a blog post to Twitter, I couldn’t easily find a WordPress plugin that already allows these other interactions as options at all. I suspect it may be because the other side of the interaction of bringing the replies back to one’s site isn’t commonly known yet.

Example

I was able to write a post, syndicate it to Twitter, upload the button images, and then inject the Twitter post ID (939650287622434816 in this example) for my syndicated copy into my post like so:

<span class="syn-text">Respond via Twitter:
<ul class="relsyn">
<li><a href="https://twitter.com/intent/tweet?in_reply_to=939650287622434816" target=""><img src="/reply-icon-16.png" alt="" width="16" height="11" /> Reply</a></li>
<li><a href="https://twitter.com/intent/retweet?tweet_id=939650287622434816" target=""><img src="/retweet-icon-16.png" alt="" width="16" height="10" /> Repost</a></li>
<li><a href="https://twitter.com/intent/favorite?tweet_id=939650287622434816" target=""><img src="/like-icon-16.png" alt="" width="16" height="16" /> Like</a></li>
</ul><script type="text/javascript" async src="https://platform.twitter.com/widgets.js"></script></span>

And voila! My new post now had some simple buttons that allow users a simple one click interaction with a popup window to reply to, repost, or like my post.

Displaying responses

Naturally, through the “magic” of Brid.gy, I’m able to collect these responses via backfeed with the Webmention protocol using the Webmention Plugin for WordPress back to my own website. In simpler and less technical terms, if you use one of these buttons, your interaction with my website as posted to Twitter comes back to live on my website. Thus users can use Twitter to write a comment or reply on Twitter and it will display in my comments section just as if they had written it directly in my comments box. Likes and reposts are sent to my site and are displayed relatively naturally as facepiles under the comment headings “Likes” and “Reposts”.

I’ll do another manual example with this particular post, so feel free to use the buttons at the bottom of this post to make your response via Twitter if you wish.

Future Improvements

Taking some of this code and abstracting into a plugin for others to use would be a nice feature. Doing this would also potentially make it available as a potential plugin in the larger IndieWeb suite of WordPress plugins. Perhaps it could be easily added into the codebase in one or another pre-existing plugins? I might think that David Shanske’s  Syndication Links plugin or Bridgy Publish plugin might make sense as they’re already adding functionality for part of the publishing half of the cycle by either publishing to Twitter and/or importing the Tweet ID back into one’s WordPress site for potential display. One or the other could do a simple if/then on the existence of a syndicated Tweet, then extract the Twitter ID, and add the buttons to the interface appropriately.

It would be interesting to add full mark up to make <indie-action> functionality possible for a broader class of web actions, particularly if it could be integrated directly into WordPress in a more interesting manner to work with the Post Kinds Plugin or the IndieWeb PressThis type of bookmarklet functionality.

Instead of having these types of interactions injected at the bottom of the post, it may make more sense to have it display in the comment block instead.

I suspect that Facebook, Instagram, and others also enable some types of functionality, so adding the ability to use them the same way would be awesome. And even more so in the case of RSVP’s to events since Brid.gy handles those relatively well between Facebook and WordPress sites. (See this example.)

Try it yourself

Go ahead and use the buttons below to interact with this post via Twitter.

Syndicated copies to:

👓 Content, bloat, privacy, archives | Peter Molnar

Content, bloat, privacy, archives by Peter MolnarPeter Molnar (petermolnar.net)
I spent a lot of time trying centralising my online activities, including adding bookmarks and imports from social networks. Lately my site looked bloated and unmaintainable. I started questioning what data is my data, what data should or could I own - it was time to rethink some ideas.

Peter has some solid thoughts here on some subtle uses of things including likes, favorites, and bookmarks. I particularly like the way he separates out and describes the “vote” intent of likes on various platforms.

Somewhat like him, I’m bookmarking things I’d like to read privately on the back end of my site, and then only selectively posting them as read posts when I’ve done that. Archiving them to the Internet Archive has been useful for cutting down on the data I’m keeping, but saving them does allow me to browse through my commonplace book frequently when I need to find something and couldn’t find it otherwise.

Some of this reminds me of the way I use the “star” functionality on Twitter (I still think of it as a star and not a heart). I don’t typically use it to mean anything in particular on Twitter itself. Instead I’m using that functionality in conjunction with an IFTTT recipe to bookmark things I’d like to read later. So in a larger sense, I’m using Twitter as a headline feed reader and marking all the things I’d like to come back and read at a later time.

Once in a blue moon, during a chat with others on Twitter, I may use the heart as an indicator to the other party that I’ve seen/read their post, particularly when I don’t intend to reply to the last in a chain of conversation. This type of ephemera or digital exhaust generally isn’t something I find useful for keeping in the long term, so like Peter I typically don’t keep/archive them on my site.

For those who haven’t read them yet, Sebastiaan Andewe has a recent article covering similar ground: Thinking about bookmarks and likes on the IndieWeb.

I find these discussions useful for thinking through what I’m doing on my own site and refining how I use it as well.​​​​

Syndicated copies to:

Chris Aldrich is reading “Maybe the Internet Isn’t a Fantastic Tool for Democracy After All”

Maybe the Internet Isn’t a Fantastic Tool for Democracy After All by Max Read (Select All)
Fake news is the easiest of the problems to fix.

…a new set of ways to report and share news could arise: a social network where the sources of articles were highlighted rather than the users sharing them. A platform that makes it easier to read a full story than to share one unread. A news feed that provides alternative sources and analysis beneath every shared article.

This sounds like the kind of platforms I’d like to have. Reminiscent of some of the discussion at the beginning of This Week in Google: episode 379 Ixnay on the Eet-tway.

I suspect that some of the recent coverage of “fake news” and how it’s being shared on social media has prompted me to begin using Reading.am, a bookmarking-esqe service that commands that users to:

Share what you’re reading. Not what you like. Not what you find interesting. Just what you’re reading.

Naturally, in IndieWeb fashion, I’m also posting these read articles to my site. While bookmarks are things that I would implicitly like to read in the near future (rather than “Christmas ornaments” I want to impress people with on my “social media Christmas tree”), there’s a big difference between them and things that I’ve actually read through and thought about.

I always feel like many of my family, friends, and the general public click “like” or “share” on articles in social media without actually having read them from top to bottom. Research would generally suggest that I’m not wrong. [1] [2] Some argue that the research needs to be more subtle too. [3] I generally refuse to participate in this type of behavior if I can avoid it.

Some portion of what I physically read isn’t shared, but at least those things marked as “read” here on my site are things that I’ve actually gone through the trouble to read from start to finish. When I can, I try to post a few highlights I found interesting along with any notes/marginalia (lately I’m loving the service Hypothes.is for doing this) on the piece to give some indication of its interest. I’ll also often try to post some of my thoughts on it, as I’m doing here.

Gauging Intent of Social Signals

I feel compelled to mention here that on some platforms like Twitter, that I don’t generally use the “like” functionality there to indicate that I’ve actually liked a tweet itself or any content that’s linked to in it. In fact, I’ve often not read anything related to the tweet but the simple headline presented in the tweet itself.

The majority of the time I’m liking/favoriting something on Twitter, it’s because I’m using an IFTTT.com applet which takes the tweets I “like” and saves them to my Pocket account where I come back to them later to read. It’s not the case that I actually read everything in my pocket queue, but those that I do read will generally appear on my site.

There are however, some extreme cases in which pieces of content are a bit beyond the pale for indicating a like on, and in those cases I won’t do so, but will manually add them to my reading queue. For some this may create some grey area about my intent when viewing things like my Twitter likes. Generally I’d recommend people view that feed as a generic linkblog of sorts. On Twitter, I far more preferred the nebulous star indicator over the current heart for indicating how I used and continue to use that bit of functionality.

I’ll also mention that I sometimes use the like/favorite functionality on some platforms to indicate to respondents that I’ve seen their post/reply. This type of usage could also be viewed as a digital “Thank You”, “hello”, or even “read receipt” of sorts since I know that the “like” intent is pushed into their notifications feed. I suspect that most recipients receive these intents as I intend them though the Twitter platform isn’t designed for this specifically.

I wish that there was a better way for platforms and their readers to better know exactly what the intent of the users’ was rather than trying to intuit them. It would be great if Twitter had the ability to allow users multiple options under each tweet to better indicate whether their intent was to bookmark, like, or favorite it, or to indicate that they actually read/watched the content on the other end of the link in the tweet.

In true IndieWeb fashion, because I can put these posts on my own site, I can directly control not only what I post, but I can be far more clear about why I’m posting it and give a better idea about what it means to me. I can also provide footnotes to allow readers to better see my underlying sources and judge for themselves their authenticity and actual gravitas. As a result, hopefully you’ll find no fake news here.

Of course some of the ensuing question is: “How does one scale this type of behaviour up?”

References

[1]
M. Gabielkov, A. Ramachandran, A. Chaintreau, and A. Legout, “Social Clicks: What and Who Gets Read on Twitter?,” SIGMETRICS Perform. Eval. Rev., vol. 44, no. 1, pp. 179–192, Jun. 2016 [Online]. Available: http://doi.acm.org/10.1145/2964791.2901462
[2]
C. Dewey, “6 in 10 of you will share this link without reading it, a new, depressing study says,” Washington Post, 16-Jun-2016. [Online]. Available: https://www.washingtonpost.com/news/the-intersect/wp/2016/06/16/six-in-10-of-you-will-share-this-link-without-reading-it-according-to-a-new-and-depressing-study/. [Accessed: 06-Dec-2016]
[3]
T. Cigelske  , “Why It’s OK to Share This Story Without Reading It ,” MediaShift, 24-Jun-2016. [Online]. Available: http://mediashift.org/2016/06/why-its-ok-to-share-this-story-without-reading-it/. [Accessed: 06-Dec-2016]
Syndicated copies to: