This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

Ajouter un bouton suivre sur twitter

14 juin 2015 à 10h44

Voici une macro qui propose un Bouton suivre sur twitter pour un utilisateur particulier :

\define twitterFollowButton(username)
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=$username$"  style="width:300px; height:20px;"></iframe>
\end

La seule modification à la version publiée sur https://dev.twitter.com/docs/follow-button est la suppression des nouvelles lignes.

Notez que l'URL src est passée sans protocole (ie "http" or "https"). De cette façon, cela fonctionne que les sites soient sur un domaine en HTTP ou en HTTPS. Si vous voulez aussi que le bouton Twitter fonctionne en utilisant TiddlyWiki horsligne par une URL "file://", vous devrez ajouter manuellement le protocole. Par exemple:

<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/follow_button.html?screen_name=jermolene"  style="width:300px; height:20px;"></iframe>