Difference between revisions of "Template:Twitter/doc"

From The Lion King Wiki
Jump to: navigation, search
(Grabbing a different feed)
(All parameters)
 
(4 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
=== Grabbing a different feed ===
 
=== Grabbing a different feed ===
  
The second parameter is the ID of the user that you want to display tweets from. To get this ID:
+
The second parameter is your Twitter user ID. It can be obtained by:
# Visit the user's profile on Twitter. For example, we will be grabbing the user ID of [http://twitter.com/Google @Google].
+
# Right-clicking on the page, and clicking "View page source" ("View source" in Internet Explorer). (Also, Ctrl+U in Firefox and Chrome).
# Right-click on the page, and click "View page source" ("View source" in Internet Explorer). (Also, Ctrl+U in Firefox and Chrome).
+
# Searching for (Ctrl+F) <code><nowiki>.rss</nowiki></code> in the page source
# Search for (Ctrl+F) ".rss" in the page source
+
# Copying the RSS feed URL. It should look something like: <code><nowiki>http://twitter.com/favorites/41208569.rss</nowiki></code>
# Copy the RSS feed URL. It should look something like: <code>http://twitter.com/favorites/276459840.rss</code>
+
# 41208569 is your user ID.
# 276459840 is the user ID.
+
<pre>{{Twitter|41208569}}</pre>
<pre>{{Twitter|35421362}}</pre>
+
Will Output: {{Twitter|41208569}}
Will Output: {{Twitter|35421362}}
+
  
 
=== Setting the number of Tweets ===
 
=== Setting the number of Tweets ===
Line 24: Line 23:
 
By default, the max number of tweets it will grab is '''10'''. If you want more or less, you can specify that in the third parameter.
 
By default, the max number of tweets it will grab is '''10'''. If you want more or less, you can specify that in the third parameter.
  
<pre>{{Twitter|35421362|15}}</pre>
+
<pre>{{Twitter|41208569|15}}</pre>
Will Output: {{Twitter|35421362|15}}
+
Will Output: {{Twitter|41208569|15}}
  
 
=== All parameters ===
 
=== All parameters ===
Line 32: Line 31:
 
| id =  
 
| id =  
 
| num =  
 
| num =  
 +
| show name = yes/no (default: no)
 +
| show date = yes/no (default: yes)
 
}}</pre>
 
}}</pre>
  
 
{{doc/end}}
 
{{doc/end}}

Latest revision as of 00:05, 5 April 2011

Template-info.png Documentation

This template uses the TwitterFeed Extension for MediaWiki.

Usage

The feed from @TLKWiki

{{Twitter}}

Will Output: <twitterfeed id="276459840" nb="10" sn="no" sd="yes"></twitterfeed>

Grabbing a different feed

The second parameter is your Twitter user ID. It can be obtained by:

  1. Right-clicking on the page, and clicking "View page source" ("View source" in Internet Explorer). (Also, Ctrl+U in Firefox and Chrome).
  2. Searching for (Ctrl+F) .rss in the page source
  3. Copying the RSS feed URL. It should look something like: http://twitter.com/favorites/41208569.rss
  4. 41208569 is your user ID.
{{Twitter|41208569}}

Will Output: <twitterfeed id="41208569" nb="10" sn="no" sd="yes"></twitterfeed>

Setting the number of Tweets

By default, the max number of tweets it will grab is 10. If you want more or less, you can specify that in the third parameter.

{{Twitter|41208569|15}}

Will Output: <twitterfeed id="41208569" nb="15" sn="no" sd="yes"></twitterfeed>

All parameters

{{Twitter
| id = 
| num = 
| show name = yes/no (default: no)
| show date = yes/no (default: yes)
}}

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.