开发者

How to get this Twitter javascript to only show 3 updates

开发者 https://www.devze.com 2023-02-09 23:26 出处:网络
I found this easy to use JavaScript for www.twitter.com updates to place on my website. When I edited the code to what my username and then placed it in my index.html the code was showing all of my st

I found this easy to use JavaScript for www.twitter.com updates to place on my website. When I edited the code to what my username and then placed it in my index.html the code was showing all of my status updates. I would like to only have this script show 2 or 3 of my newest updates. How can I make this work? What needs to get added into the script?

<script type="text/javascript" src="http://www.gtaero.net/twitter/twitter.php?user=USERNAME"></script>
<div id="twitFeed">Optional Placeholder Text</div>
<script type="text/javascript">twitt开发者_开发技巧er2id("twitFeed");</script>


Enter this URL into your browser:

http://www.gtaero.net/twitter/twitter.php?user=USERNAME

See that the script is full of documentation

The answer:

<script type="text/javascript" src="http://www.gtaero.net/twitter/twitter.php?user=USERNAME&count=3"></script>


Have a look at http://www.gtaero.net/twitter/

How to use.
(Look below for an example)
http://www.gtaero.net/twitter/

[optional]  [DEFAULT]  navarr  ?user   =USERNAME          STR  
[optional]  [DEFAULT]  10      &count  =NUMBER_TO_SHOW    INT 0-20  
[optional]  [DEFAULT]  true    &time   =DISPLAY_TIME      BOOL[true,false]  Display the Time of the Tweet  
[optional]  [DEFAULT]  true    &client =DISPLAY_CLIENT    BOOL[true,false]  Display the Client the tweet was posted from  
[optional]  [DEFAULT]  true    &br     =BREAK_TWEET_TIME  BOOL[true,false]  Break the Tweet and the Time in HTML (<br />)
[optional]  [DEFAULT]  false   &turl   =USE_TURLED        BOOL[true,false]  Use Turled profile links instead of twitter
[optional]  [DEFAULT]  5       &cache  =MINUTES_TO_CACHE  INT >= 5          The number of minutes (greater than or equal to five) to cache tweets.

...

Example of URL with variables: http://gtaero.net/twitter/?user=navarr&count=5

These are variables for the URL. You already have user. So you need:

http://www.gtaero.net/twitter/?user=USERNAME&count=3
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号