mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 23:34:50 +00:00
Add instructions for adding a Twitter Follow button
This commit is contained in:
parent
385099c4f7
commit
5758fcb69b
@ -0,0 +1,21 @@
|
||||
created: 20140103091348509
|
||||
modified: 20140103091632825
|
||||
tags: howto tips
|
||||
title: Adding a Twitter Follow button
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Here's a macro that provides a Twitter Follow button for a particular username:
|
||||
|
||||
```
|
||||
\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
|
||||
```
|
||||
|
||||
The only change from the version published at https://dev.twitter.com/docs/follow-button is that new lines have been removed.
|
||||
|
||||
Note that the src URL is given without a protocol (ie "http" or "https"). It's done this way so that it works on sites whether they are hosted on a HTTP or HTTPS domain. If you want the Twitter button to work while using a TiddlyWiki offline on a "file://" URL, then you'll need to manually add the protocol. For example:
|
||||
|
||||
```
|
||||
<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>
|
||||
```
|
Loading…
Reference in New Issue
Block a user