Service to share on any Diaspora* pod
Just created a little redirecter for sharing on Diaspora social network. It has a very simple way of working:
- User clicks share button on a web page that has it implemented
- Sharer service will look for a previous cookie on the users computer and retrieve the pod name
- If such cookie doesn't exist (=user has not shared via this service on this computer before, or has cleared cookies), user will be prompted for the diaspora pod name (for example joindiaspora.com). Name must be without 'http' etc, just the domain name.
- If such prompt is made, a cookie is saved for future use.
- Sharer service redirects to the appropriate pod bookmarklet sharing interface with the url and title passed to it from the page where the button was clicked.
I haven't seen a service yet that allows sharing for any pod, so I decided to set up my own. Feel free to use it on your blog if you like it. The sharer does NOT save any data (except one cookie with a pod name), it just redirects to the pod that the user is on. My server has good uptime, but of course I cannot promise 100% service due to ISP only promising 99,99% :)
If you want to use the service on your blog or website, add this code to the relevant part where you want the image displayed.
<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>
The image referenced in the code is by Naesk. Any image can be used, just place your favorite Diaspora share icon on the url in the code.
The sharer code can be downloaded here (right click and save). It probably has some bugs (only tested on Chrome and FF) and doesn't for example shorten urls at the moment, but I'll be adding to it if someone finds it useful. So feedback appreciated :)
Btw, you can find me on joindiaspora.com.












Comments (post a comment)