You find them on blogs, personal websites, corporate sites and even on Diaspora: social sharing buttons! The past few years share buttons have popped-up in many a place, turning dull content headers and footers into colourful pixel art. One button, however, is still missing from the collection: a “Share on Diaspora” button.
Share button attempts
A few months ago Maxwell Salzburg created a Diaspora Bookmarklet on a special request by his sister. Ever since its release people have been toying around with the bookmarklet code to develop their own “Share on Diaspora” buttons. Lots of them!
One that seems to have caught a lot of attention is Mur’s share button. Although its visual design can be called original, the technical back-end is almost entirely the same as that of any other Diaspora share button.

A guy called “Burnman” decided to go even further by releasing a Diaspora share button plugin for WordPress. Simply install and activate the plugin and a Diaspora share button will be added to all your articles! Sounds great right?
Well, unfortunately…
these share buttons are all massively flawed. Do not put them on your blog!
As said before, these buttons are based on the bookmarklet code. This code contains a reference to the pod the code has been taken from. In many cases this is the official pod at joindiaspora.com. As a result, these buttons cannot share content to any pod other than joindiaspora. They are simply useless to people on other pods.
What a real share button should look like
There are three requirements to be met when designing a Diaspora share button for broad adoption.
Facebook’s “like” button automatically connects to Facebook.com, after which it will check whether someone is logged in. If yes, then the message will be delivered to the logged in account. In the case of Diaspora, however, the user needs to manually tell the button where to forward the message to as the Diaspora network consists of multiple pods. Based on the information provided by the user, the button can connect to the right pod to share the content with the users’ contacts.
Of course you do not want to have to tell the button which pod you are on every single time you click it. To ensure that the button works as fast as a Facebook or Twitter share button, there will need to be a way to save the pod url locally. This can probably be done using cookies. I am not a web developer though!
It should also be possible to reset the share button to allow connecting to a different pod, for example when your sister goes on your computer and she is not on the same pod as you.
All the above steps are extra steps that need to be made entirely because of the federated nature of Diaspora!
A working share button!
While doing some research for this blog post I came across a share button that works for all pods. If you use a share button that does not support multiple pods then copy/paste the following code:
<img src="http://iliketoast.net/img/diasporaWebBadge80x15_3.png" border="0" onClick="dshare();">
<script type="text/javascript">
function dshare() {
var url = window.location.href;
var title = document.title;
window.open('http://iliketoast.net/dshare.html?url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title),'dshare','location=no,links=no,scrollbars=no,toolbar=no,width=620,height=400');
return false;
}
</script>
You can check this button out right here on Diasporial!
In short…
If you use a Diaspora share button on your website which does not ask the user which pod they are on, then burn it!
|
Kevin Kleinman |
Now to find out how to render that Diaspora share button on Diasporial.
Jason Robinson |
Some more info about the sharing service mentioned in the last section of this post (thanks Diasporial!
)
Adding to any page where you can embed HTML and JavaScript:
http://www.basshero.org/blog/108/service-to-share-on-any-diaspora%2A-pod
Adding on WordPress.com hosted WordPress blogs:
http://www.basshero.org/blog/109/share-on-any-diaspora-pod-from-wordpress
Adding on Blogger (thanks to Bartimeo* David Charte for this):
https://joindiaspora.com/posts/460681
In short – the sharing service is a simple javascript piece of code that receives the share request, asks the user for the pod (only once!) and then forwards the sharing request to the bookmarklet of the pod given by the user. I’ll be creating a small info page about it soon.
In an ideal situation the sharing would somehow be federated, in multiple places. Don’t know if that sort of ‘load balancing’ would be possible that a single url would if necessary resolve via many different routes.
Kevin Kleinman |
Thank you sir! I have been waiting for a button like yours for a few months now. Totally love it!
Amgine |
Of course this assumes the reader allows iliketoast.com and jquery.com to run third-party javascript in their browsers (the somewhat more privacy-oriented people using Noscript, etc. may be unable to use this button.)
Oscar |
It’s cool, it would be so much cleaner if the share button presented with a top list of the most popular pods for us to just select from.
Will |
Yeah, +1 for this. Would help eliminate typing error too.
Sebastian :-Þ |
I would add a simple
if(window.diasporasharer != undefined){
window.diasporasharer(url,title,notes,images);
}else{
for using available userscripts or extensions instead of a central server and cookies.
https://pod.geraspora.de/posts/121940
Pingback: Diaspora und das Problem mit dem dezentralen Ansatz | | Daily PodDaily Pod
Pingback: Diasporan jakonappula « Suomen FLOSS Manuals
domesticempire |
I made a mini Diaspora button that anyone is free to use here: http://domesticempire.wordpress.com/2011/11/08/diaspora-button/
Pingback: Diaspora Button | domestic empire
chris |
are you serious?
loading JQuery.js just to set/get some Cookies and do some url-parsing?
chris
chris |
less code…
http://hosting.more-elements.com/diaspora_share.zip
chris |
online-version could be found at
http://t2mo.cc/dshare
chris
Nils |
check this one out http://sharetodiaspora.github.com/about/
it has a set of selectable pods included
Nils |
Leider bekomme ich bei Benutzung deines Buttons einen Fehler von Geraspoa:
“We are down right now!
But we will be back soon!”
Rick van Rein |
I hope you are not proposing to publish this as _just_ button code? This way, the nicely distributed network of Diaspora* would centralise all connectivity control on the site that it happens to mention as a server side — iliketoast.com.
A true solution should implement another thing, namely to run the server-side of the system on the server that also runs the content being shared.
I know this defeats the ideal of having a button that works everywhere after an initial setup. And that is precisely why installing a bookmarklet works much better for Diaspora* than having one of these site-selected buttons.
The buttons are part of the problem that Diaspora* is trying to solve — and using them (like this) kills the central idea of Diaspora*. Get a nice bookmarklet and share anything you like, and not just the sites that implement these buttons.
Bugsbane |
This share button doesn’t seem to be working right now. It just brings up a blank page, on both this site and mine. :/
Methinks we need it to be as distributed as Diaspora (or more-so)
Pingback: Changer de thème sur StatusNet
Simounet |
Hi,
I’ve made a Diaspora Share Button easy to use (one line to place into your code), customizable and multilingual.
You can check / use / fork it here : http://simou.net/dsbsite .
An example is on the top of the previous link’s page.
Hope you will enjoy it and feel free to give your feelings about it.
Pingback: Share-Button für Diaspora* « mentalschnupfen