Using Twitter Web Intents

lisa Lisa, 3rd April 2013

We've just added some social media links to Poole Trail so that people can share the great stories and media on the City Insights route.

As the design called for custom links rather than just social media icons / widgets, we discovered that the old way of doing things for Twitter doesn't work on Twitter's mobile platform.

You used to be able to link to:

http://twitter.com/home?status=your%20status%20here

And when someone clicked on that link, your text would be entered as a new tweet they could then publish:


But whilst that still works fine for someone clicking the link on a computer, anyone on a mobile will just be taken to Twitter's mobile site and shown their feed (or be asked to log in, followed by their feed).

So we thought we might have to use the Twitter API, which wouldn't be a problem... but it did seem a little overkill as the docs are all about OAuth and authenticating and it all seemed a little OTT for the task in hand.

But luckily, Twitter felt the same! And we found this line...

"If this signing process sounds like it is beyond the scope of your integration, consider using Web Intents, which do not need to use OAuth to interact with the Twitter API."

So Web Intents is what we used. Complete with auto-shortening of links (which Twitter then automatically un-shortens) and an added hastag of #cityinsights.



More from our blog

18a win Netty 2024 award for Activibees.com

18a win Netty 2024 award for Activibees.com

29.02.24

We are delighted to announce that 18a has been recognised for its outstanding work in the "Web Design Agency of the Year - UK" category at… Read →

Generating an Effective Content Security Policy with your Laravel React App

Generating an Effective Content Security Policy with your Laravel React App

27.02.24

I recently had an interesting problem to solve. I'd built a brand new author website on a shiny installation of Laravel 10, utilising its out-of-the-box… Read →

If your WordPress website looks broken, it could be because of this.

If your WordPress website looks broken, it could be because of this.

15.02.24

WordPress is the incredibly popular blogging-come-full-website platform that powers over 835 million websites* in 2024. It's functionality is extended by plugins, and one such very… Read →