There is absolutely loads of data out there, in the World Wide Web. More and more added daily (including this!).
But how many of us actually make use of that data?
A while back, Twitter launched their “Twitter Cards” – I was quite soon to jump on board, I thought they were pretty nifty – especially for blogs who have multiple authors, it certainly allows the author to stand out a little bit more. But that’s not exactly what I’m writing about here.
Just today, I launched version 1.5 of my Chrome Extension, “Share On”, as the name may suggest… for sharing pages. It was supposed to make things easier. Whether it does for people, I don’t know. But I certainly use it.
However, there was just one thing that did put me off it when sharing on Twitter – the via @username. I always thing when sharing an article, it’s nice to have the via attribute, give the author some credit.
This was something I certainly wanted to add… But I didn’t want to go re-inventing the wheel by searching for the share button and grabbing the username from it and appending it to the URL. It would have been extremely difficult, not every site uses the same button … and well, let’s not go into detail.
Though, with the use of the meta data popped in for the cards, I could make it happen… with the content ‘twitter:creator’. Long story short, it’s a tag in the webpage which says who wrote the article (their Twitter username!) and seeing as we’re sharing the article on Twitter. It seemed silly not to use it.
So, using the
for loop (Oh yes, this took some research). We search for the meta tag, grab the content of it (in this case the username) and append it to our Twitter Sharing URL. Simple, clearly…
I for one am very excited about this feature (probably because I built it but still).
So for those who have, expect an update soon (and a full changelog can be seen here), for those who don’t… Well, now you know and pretty cool new feature…