Planet KegTux
Le planet des blogueurs de KegTux.org
  • Accueil
  • Top 10
  • Statistiques
  • Inscription
  • Archives
  • Contact

Abonnement

  • feed  Fil de tous les articles
  • feed  Fil des articles populaires

Membres

  • feed Influence PC
  • feed KegTux Info
  • feed Radek411
  • feed Vinilox

Participer

  • meta  Ajouter votre blog
  • meta  Administration

 

Filtrer les articles :     Articles du jour   -   Articles de la semaine   -   Articles du mois   -   Tous les articles
 

Identi.ca share button Twitter-like

0 vote
Par Influence PC le 06/03/2012 à 10:45 Voir l'article

I recently decided it was time to come back to Identi.ca. The website is powered by StatusNet, which is an open-source microblogging engine that lets you exchange short messages. Many websites allow sharing links to social networks, and I decided to implement this Twitter-like feature on Identi.ca.

It is written entirely in JavaScript, anyone can integrate it in his own site without necessarily having to modify a file. DotClear or WordPress offer to place code in widgets, the code does not depend in the CMS.

Better yet, drag and drop the button in the bookmarks toolbar of your browser and you’ll be able to make an universal button; even sites that are do not have this feature can be shared on Identi.ca!

Identi.ca
0
Identi.ca
0

Each button is licensed under CC-BY. It includes some comments to respect the license. You are free to choose whether to let them or not, but I’d prefer if you did :D
For more info, see the CC-BY licence.

Download identica-share-button.html

Download identica-share-button-large.html

The counter is updated only every 24 hours.

I opened a ticket on StatusNet to report a redirection problem that occurs when you are not logged on Identi.ca. After logging in, you will be returned to your stream instead of being returned to the previous page containing your message.

One of the big problems I had was to shorten the page’s URL by calling url-shortener’s APIs throught AJAX. This forces the use of XMLHttpRequest from one website to another, and is subject to security policies that few APIs allow (to prevent cross site scripting). Answers to requests must contain the following header:

Access-Control-Allow-Origin: *

And so far I’ve only found http://is.gd/ that allows cross-domain calls. This problem can however be solved easily by invoking the PHP API:

header(‘Access-Control-Allow-Origin: *’);

(more informations on Wikipedia (JSONP cross-site) and on siteduzero (AJAX cross-domain))

Buttons are compatible with Firefox 3.6+, Chrome 10+ and Safari 5.1+. IE and Opera 9 do not appear to be supported but IE 10 should be.

If you have any idea of improvements, I’d be really happy if you could write a comment below this article.

Don’t forget to follow the comments RSS feed to be alerted, I’ll post one to describe any new update.

Produit par le BilboPlanet CSS - Xhtml valide Produit par le BilboPlanet Retour au début