<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>陈志伟博客 &#187; twitter</title>
	<atom:link href="http://chenzhiwei.net/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://chenzhiwei.net</link>
	<description>善始者实繁，克终者盖寡。</description>
	<lastBuildDate>Tue, 03 Jan 2012 09:14:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>博客上添加twitter挂件的方法-超级简单</title>
		<link>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/</link>
		<comments>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 12:23:03 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[互联网络]]></category>
		<category><![CDATA[建站相关]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[挂件]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30219</guid>
		<description><![CDATA[最近一不小心发现原来在博客上添加twitter挂件很简单。只需要一个twitter api  地址，几行代码就可以了，现在贴出来与各位同学分享。以下是相关说明。 假设你的twitter api地址是：http://abc.com/api/ 只需要将以下代码第六行中的twitter_username改为你自己的twitter用户名，其中的count=2是说明只显示最新的两条推。你可以根据自己的需求而适当更改。将这几行代码加到&#60;head&#62;&#60;/head&#62;之间，当然，你也可以加到主题的function.php或其他.php文件里面。看完以下代码后你会发现，只需稍做修改就可以运用到静态网页中了。 1 2 3 4 5 6 7 8 9 &#60;?php function twitter_show&#40;&#41; &#123; ?&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://abc.com/api/javascripts/blogger.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://abc.com/api/statuses/user_timeline/twitter_username.json?callback=twitterCallback2&#38;count=2&#34;&#62;&#60;/script&#62; &#60;?php &#125; ?&#62; 以下代码是显示twitter条目的代码，你可以加到博客侧边栏或者加到博客顶部，像我博客(chenzhiwei.net)这样，由于博客主机速度原因，加载javascript太慢，所以将顶部tweets去掉了，效果见http://chenzhiwei.net/twitter/tweets.php ，因api原因，有时可能会显示不出来，刷新一下就OK了。如果懂CSS的话，你自己还可以优化一下tweets的显示，使用其更加美观。 1 2 3 4 5 6 &#60;div id=&#34;&#34;&#62; &#60;ul id=&#34;twitter_update_list&#34;&#62; &#60;li&#62;&#38;nbsp;loading...&#60;/li&#62; &#60;?php twitter_show&#40;&#41;; ?&#62; &#60;/ul&#62; &#60;/div&#62; 到此，博客上添加twitter挂件功能就实现了，非常简单。 下面给出一个测试例子：index.php文件，将该文件中的http://abc.com/api/改为你自己的twitter api地址，然后运行该文件后就会显示两条tweets。效果见http://chenzhiwei.net/twitter/tweets.php 。 1 2 3 4 [...]]]></description>
			<content:encoded><![CDATA[<p>最近一不小心发现原来在博客上添加twitter挂件很简单。只需要一个twitter api  地址，几行代码就可以了，现在贴出来与各位同学分享。以下是相关说明。</p>
<p>假设你的twitter api地址是：http://abc.com/api/</p>
<p>只需要将以下代码第六行中的<span style="color: #ff0000;">twitter_username</span>改为你自己的twitter用户名，其中的<span style="color: #ff0000;">count=2</span>是说明只显示最新的两条推。你可以根据自己的需求而适当更改。将这几行代码加到&lt;head&gt;&lt;/head&gt;之间，当然，你也可以加到主题的function.php或其他.php文件里面。看完以下代码后你会发现，只需稍做修改就可以运用到静态网页中了。<span id="more-30219"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/javascripts/blogger.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/statuses/user_timeline/twitter_username.json?callback=twitterCallback2&amp;count=2&quot;&gt;&lt;/script&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>以下代码是显示twitter条目的代码，你可以加到博客侧边栏或者加到博客顶部，像我<a href="http://chenzhiwei.net">博客</a>(<a href="http://chenzhiwei.net">chenzhiwei.net</a>)这样，由于博客主机速度原因，加载javascript太慢，所以将顶部tweets去掉了，效果见<a href="http://chenzhiwei.net/twitter/tweets.php" target="_blank">http://chenzhiwei.net/twitter/tweets.php</a> ，因api原因，有时可能会显示不出来，刷新一下就OK了。如果懂CSS的话，你自己还可以优化一下tweets的显示，使用其更加美观。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&lt;div id<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">&gt;</span>
	&lt;ul id<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span><span style="color: #00AA00;">&gt;</span>
		&lt;li<span style="color: #00AA00;">&gt;</span>&amp;nbsp<span style="color: #00AA00;">;</span>loading...&lt;/li<span style="color: #00AA00;">&gt;</span>
		&lt;?php twitter_show<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> ?<span style="color: #00AA00;">&gt;</span>
	&lt;/ul<span style="color: #00AA00;">&gt;</span>
&lt;/div<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p>到此，博客上添加twitter挂件功能就实现了，非常简单。<br />
下面给出一个测试例子：index.php文件，将该文件中的http://abc.com/api/改为你自己的twitter api地址，然后运行该文件后就会显示两条tweets。效果见<a href="http://chenzhiwei.net/twitter/tweets.php" target="_blank">http://chenzhiwei.net/twitter/tweets.php</a> 。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
&lt;title&gt;show tweets&lt;/title&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/javascripts/blogger.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/statuses/user_timeline/chenzhiwei.json?callback=twitterCallback2&amp;count=2&quot;&gt;&lt;/script&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/head&gt;
&lt;body&gt;
    &lt;ul id=&quot;twitter_update_list&quot;&gt;
        &lt;li&gt;&amp;nbsp;&lt;/li&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客上添加twitter挂件的方法-超级简单" href="http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/">http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/08/the-new-discovery/" title="我这几天的新发现">我这几天的新发现</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>我这几天的新发现</title>
		<link>http://chenzhiwei.net/2009/08/the-new-discovery/</link>
		<comments>http://chenzhiwei.net/2009/08/the-new-discovery/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 08:14:33 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[互联网络]]></category>
		<category><![CDATA[新闻阅读]]></category>
		<category><![CDATA[google reader]]></category>
		<category><![CDATA[puff]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[youdao reader]]></category>

		<guid isPermaLink="false">/2009/08/the-new-discovery.html</guid>
		<description><![CDATA[项目一直在进行中，但有时我也会偷懒一会，上网逛逛，看看有没有新的产品出现。以前我都是先在百度新闻的互联网频道上看然后再去有道热闻的互联网频道看，有时也会偶尔去人民网，新华网等去看看，而自从我用了Google Reader之后，我便多了一个选择，我首先检查的是我Reader里最新条目，看完后如果有时间的话再去百度那里看看。说实话，自从用了Google Reader之后，我去百度那里看新闻的时间越来越少了。有时我也会打开Youdao Reader看看。 好了，该切入话题了。 1.g.ho.st ，这是个网络操作系统，以浏览器为入口，输入用户名与密码后就可以进入了，当你让浏览器全屏显示时，你会发现，这个网络操作系统和真实的操作系统没什么区别，支持N多种语言，不过对大部分人来说，只要支持英文与中文就够了，还可以同步Windows与Mac。内置了twitter,friendfeed,Gmail,Yahoo,Gtalk,Google Docs,MSN等等，还有N多，我在这里就不一一列出来了。喜欢尝鲜的同学可以来这里申请一个帐户体验一下(http://g.ho.st/)。 2.Puff，这是个代理上网软件，简单，小巧，易用。之前我知道有tor与无界，Tor的速度慢大家都知道，无界用起来还可以，不过自动打开的页面中有些XX的言论，我用无界都是在Chrome下使用，速度还行。这个Puff速度是相当的牛B，在Youtube上看视频是非常的快，我还用迅雷下载了Youbube上的视频，也是用Puff代理下载的。一般我用代理也就是去blogger上写写文章，看看自己的friendfeed等国内不能访问的web2.0站点，其他事情我是不会做的。想用的话自己可以上网搜索，我不提供下载。 3.twitese，推特中文圈，地址是：http://twitese.appspot.com/。一个架设在GAE上面的通向twitter的网站，用twitter帐户登录，当你登录上去你会发现，这个推特中文圈就像是twitter的中文版，是比twitter还好用的twitter，听说是和饭否的界面差不多，因为我没用过饭否，所以不知道饭否的界面如何。从这个推特中文圈的建立，我更担心GAE了，之前就有很多同学用GAE做在线代理，现在GAE上又出现了这个应用，不知道会不会被封掉。在这里我想说一句，希望那些用GAE做在线代理的同学们，在线代理多一个不多，少一个不少，没事尽量不要用GAE做在线代理，这可能会让很多在GAE上搭建的应用在国内不能访问。 最后，大家可以订阅我在Google Reader里分享的Items，也可以通过feedsky或feedburner来订阅本博客。 &#169; 2009, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2009/08/the-new-discovery/相关日志使用阅读器订阅文章博客上添加twitter挂件的方法-超级简单]]></description>
			<content:encoded><![CDATA[<p>项目一直在进行中，但有时我也会偷懒一会，上网逛逛，看看有没有新的产品出现。以前我都是先在百度新闻的互联网频道上看然后再去有道热闻的互联网频道看，有时也会偶尔去人民网，新华网等去看看，而自从我用了<a title="my shered items in google reader" href="http://feeds.feedburner.com/zhiweis" target="_blank">Google Reader</a>之后，我便多了一个选择，我首先检查的是我Reader里最新条目，看完后如果有时间的话再去百度那里看看。说实话，自从用了<a href="http://feeds.feedburner.com/zhiweis" target="_blank">Google Reader</a>之后，我去百度那里看新闻的时间越来越少了。有时我也会打开<a href="http://feeds.feedburner.com/zhiweis" target="_blank">Youdao Reader</a>看看。<br />
好了，该切入话题了。<span id="more-11002"></span></p>
<p><strong>1.g.ho.st </strong>，这是个网络操作系统，以浏览器为入口，输入用户名与密码后就可以进入了，当你让浏览器全屏显示时，你会发现，这个网络操作系统和真实的操作系统没什么区别，支持N多种语言，不过对大部分人来说，只要支持英文与中文就够了，还可以同步Windows与Mac。内置了twitter,friendfeed,Gmail,Yahoo,Gtalk,Google Docs,MSN等等，还有N多，我在这里就不一一列出来了。喜欢尝鲜的同学可以来这里申请一个帐户体验一下(<a href="http://g.ho.st/" target="_blank">http://g.ho.st/</a>)。</p>
<p><strong>2.Puff</strong>，这是个代理上网软件，简单，小巧，易用。之前我知道有tor与无界，Tor的速度慢大家都知道，无界用起来还可以，不过自动打开的页面中有些XX的言论，我用无界都是在Chrome下使用，速度还行。这个Puff速度是相当的牛B，在Youtube上看视频是非常的快，我还用迅雷下载了Youbube上的视频，也是用Puff代理下载的。一般我用代理也就是去blogger上写写文章，看看自己的friendfeed等国内不能访问的web2.0站点，其他事情我是不会做的。想用的话自己可以上网搜索，我不提供下载。</p>
<p><strong>3.</strong><strong>twitese</strong>，推特中文圈，地址是：<a href="http://twitese.appspot.com/" target="_blank">http://twitese.appspot.com/</a>。一个架设在GAE上面的通向twitter的网站，用twitter帐户登录，当你登录上去你会发现，这个推特中文圈就像是twitter的中文版，是比twitter还好用的twitter，听说是和饭否的界面差不多，因为我没用过饭否，所以不知道饭否的界面如何。从这个推特中文圈的建立，我更担心GAE了，之前就有很多同学用GAE做在线代理，现在GAE上又出现了这个应用，不知道会不会被封掉。在这里我想说一句，希望那些用GAE做在线代理的同学们，在线代理多一个不多，少一个不少，没事尽量不要用GAE做在线代理，这可能会让很多在GAE上搭建的应用在国内不能访问。</p>
<p>最后，<a href="http://feeds.feedburner.com/zhiweis" target="_blank">大家可以订阅我在Google Reader里分享的Items</a>，也可以通过<a href="http://feed.chenzhiwei.net" target="_blank">feedsky</a>或<a href="http://feeds.feedburner.com/chenzhiwei" target="_blank">feedburner</a>来订阅本博客。</p>
<p style="font-weight: bold;">&copy; 2009, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="我这几天的新发现" href="http://chenzhiwei.net/2009/08/the-new-discovery/">http://chenzhiwei.net/2009/08/the-new-discovery/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/03/use-reader-to-read-news/" title="使用阅读器订阅文章">使用阅读器订阅文章</a></li><li><a href="http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/" title="博客上添加twitter挂件的方法-超级简单">博客上添加twitter挂件的方法-超级简单</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2009/08/the-new-discovery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

