<?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; FB</title>
	<atom:link href="http://blog.frost.tw/tag/fb/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.frost.tw</link>
	<description>夢醒之時，驚覺一切都是虛幻。前行吧！迷途者。</description>
	<lastBuildDate>Wed, 26 Oct 2011 13:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://blog.frost.tw/?pushpress=hub'/>
		<item>
		<title>原來網誌粉絲男性較多</title>
		<link>http://blog.frost.tw/life/poston-2009-12-11/postid-246</link>
		<comments>http://blog.frost.tw/life/poston-2009-12-11/postid-246#comments</comments>
		<pubDate>Fri, 11 Dec 2009 10:59:50 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[生活雜記]]></category>
		<category><![CDATA[FB]]></category>
		<category><![CDATA[網站]]></category>
		<category><![CDATA[網誌]]></category>
		<category><![CDATA[訪客]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=246</guid>
		<description><![CDATA[今天早上看了 Facebook 粉絲專頁的統計。 沒想到，男生竟然佔了大概百分之七十多。 不知道是我的「好友」都是男生，還是內容比較吸引「男生」 也許大家會認為「男生」、「女生」對網站影響不大。 不過以我的「觀念」來說，吸引女生的網站應該會比較吃香。 為什麼會這樣想呢？ 首先，男孩子對於電腦興趣可能比較大，所以比較熟練各種東西。 而線上遊戲的玩家組成，男生佔得比例通常也比較高。 這就出現一個明顯的問題點「有多少男生去玩線上遊戲了？」 如此一來，我們可以很快的把這群人去掉。 接著，既然男生對於資訊接觸比較多，因此也會有各種興趣。 如：架站、寫程式等等…… 那麼這些花費的時間，就無暇去顧及其他網站。 （不過說真的，要架站得多去逛網站才能搞好，這是我的經驗。） 反過來看看女孩子們的網路生活。 女孩子也許討厭線上遊戲的打打殺殺，因此轉向聊天室等等發展。 去除有玩遊戲的女孩子，她們在社群方面發展比較多。 也因此，在經營網站時募集人氣的能力也比男生強很多。 再來，她們通常會到討論版上聊聊天。 因此逛網站的機率就相對提高，也比較容易進入各種網站。 因此概觀來看，吸引女生的網站通常能引起熱烈討論。 而弦夜在期待什麼？ 不外乎就只是能和逛網站的網友，聊聊天。 僅只如此，卻一直沒有這個機會。 我很確定的告訴大家「每當你們留言，我是非常高興的！」 我想，每個站長也是如此。 因此，下次請多多留言，即使是句鼓勵也會讓站長得到很大的鼓舞。 最後補一句：「其實我希望網站的訪客是男女平均。」<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-17%2Fpostid-260&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我能為訪客做什麼？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-27%2Fpostid-286&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌更換主機</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌新版面設計</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-16%2Fpostid-332&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">個人網站的規劃</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天早上看了 Facebook 粉絲專頁的統計。<br />
沒想到，男生竟然佔了大概百分之七十多。<br />
不知道是我的「好友」都是男生，還是內容比較吸引「男生」<br />
<span id="more-246"></span><br />
也許大家會認為「男生」、「女生」對網站影響不大。<br />
不過以我的「觀念」來說，吸引女生的網站應該會比較吃香。</p>
<p>為什麼會這樣想呢？<br />
首先，男孩子對於電腦興趣可能比較大，所以比較熟練各種東西。<br />
而線上遊戲的玩家組成，男生佔得比例通常也比較高。</p>
<p>這就出現一個明顯的問題點「有多少男生去玩線上遊戲了？」<br />
如此一來，我們可以很快的把這群人去掉。</p>
<p>接著，既然男生對於資訊接觸比較多，因此也會有各種興趣。<br />
如：架站、寫程式等等……<br />
那麼這些花費的時間，就無暇去顧及其他網站。<br />
（不過說真的，要架站得多去逛網站才能搞好，這是我的經驗。）</p>
<p>反過來看看女孩子們的網路生活。<br />
女孩子也許討厭線上遊戲的打打殺殺，因此轉向聊天室等等發展。<br />
去除有玩遊戲的女孩子，她們在社群方面發展比較多。<br />
也因此，在經營網站時募集人氣的能力也比男生強很多。</p>
<p>再來，她們通常會到討論版上聊聊天。<br />
因此逛網站的機率就相對提高，也比較容易進入各種網站。</p>
<p>因此概觀來看，吸引女生的網站通常能引起熱烈討論。</p>
<p>而弦夜在期待什麼？<br />
不外乎就只是能和逛網站的網友，聊聊天。<br />
僅只如此，卻一直沒有這個機會。</p>
<p>我很確定的告訴大家「每當你們留言，我是非常高興的！」<br />
我想，每個站長也是如此。<br />
因此，下次請多多留言，即使是句鼓勵也會讓站長得到很大的鼓舞。</p>
<p>最後補一句：「其實我希望網站的訪客是男女平均。」</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-17%2Fpostid-260&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我能為訪客做什麼？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-27%2Fpostid-286&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌更換主機</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌新版面設計</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-16%2Fpostid-332&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-12-11%2Fpostid-246">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">個人網站的規劃</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/life/poston-2009-12-11/postid-246/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mission: 時間回收</title>
		<link>http://blog.frost.tw/life/poston-2009-10-29/postid-124</link>
		<comments>http://blog.frost.tw/life/poston-2009-10-29/postid-124#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:49:58 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[生活雜記]]></category>
		<category><![CDATA[FB]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[時間]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=124</guid>
		<description><![CDATA[有時候，總會覺得時間似乎足夠。 有時候，又會覺得時間不太足夠。 也許，時間的控制應該調整更穩定才行。最近使用 Facebook 的次數提高， 不過也因此，我到是認為 Facebook 的 Application Developer 是很有福的！ 也因此，我決定在寒假的時候進行 Facebook Application 的開發。 不過，以目前時間的掌控情況來說。 這樣子大概沒辦法擠出時間吧！ 所以要從現在開始使進行「時間回收」 盡可能的掌控好寒假的時間，然後用於開發。 而現在我能做的「回收」 不外乎就是避免複習消耗過多時間，以及技巧的提高。 一旦技巧提高，那麼時間就會自然增加。 也因此，我必須在現在消耗更多的時間。 希望寒假，我可以如願完成我的 Project!<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-09-10%2Fpostid-23&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">與時間賽跑的生活</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-06%2Fpostid-310&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">時與時之流轉</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造修正（登入更新資料）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-09-17%2Fpostid-36&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">燃燒的祭典</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>有時候，總會覺得時間似乎足夠。<br />
有時候，又會覺得時間不太足夠。<br />
也許，時間的控制應該調整更穩定才行。<span id="more-124"></span>最近使用 Facebook 的次數提高，<br />
不過也因此，我到是認為 Facebook 的 Application Developer 是很有福的！<br />
也因此，我決定在寒假的時候進行 Facebook Application 的開發。</p>
<p>不過，以目前時間的掌控情況來說。<br />
這樣子大概沒辦法擠出時間吧！</p>
<p>所以要從現在開始使進行「時間回收」<br />
盡可能的掌控好寒假的時間，然後用於開發。</p>
<p>而現在我能做的「回收」<br />
不外乎就是避免複習消耗過多時間，以及技巧的提高。<br />
一旦技巧提高，那麼時間就會自然增加。</p>
<p>也因此，我必須在現在消耗更多的時間。<br />
希望寒假，我可以如願完成我的 Project!</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-09-10%2Fpostid-23&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">與時間賽跑的生活</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-06%2Fpostid-310&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">時與時之流轉</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造修正（登入更新資料）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-09-17%2Fpostid-36&from=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2009-10-29%2Fpostid-124">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">燃燒的祭典</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/life/poston-2009-10-29/postid-124/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-FBConnect 改造修正（登入更新資料）</title>
		<link>http://blog.frost.tw/code/poston-2009-10-21/postid-102</link>
		<comments>http://blog.frost.tw/code/poston-2009-10-21/postid-102#comments</comments>
		<pubDate>Wed, 21 Oct 2009 10:26:42 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[程式語言]]></category>
		<category><![CDATA[FB]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[程式]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=102</guid>
		<description><![CDATA[昨天很高興的登入班網之後，卻發現…… 資料竟然又被改回來了！！ （這可讓弦受到不小打擊呢！）仔細一看，結果發現了一個細節問題…… 在 fbconnect.php 裡面，竟然還有「殘存」的部份沒被修正。 而這次修改很簡單，只需要打開 fbconnect.php 找到下面的函式： function fbc_update_facebook_data($force=false) { $last_cache_update = get_option(FBC_LAST_UPDATED_CACHE_OPTION); $delta = time() - $last_cache_update; if ($delta < 24*60*60 &#038;&#038; !$force) { return; } update_option(FBC_LAST_UPDATED_CACHE_OPTION, time()); global $wpdb; $sql = "SELECT user_id, meta_value FROM $wpdb->usermeta &#8230; <a href="http://blog.frost.tw/code/poston-2009-10-21/postid-102">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造簡記（登入更新資料修正）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-22%2Fpostid-663&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Array Sort (陣列排序)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-12%2Fpostid-636&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上一直忽略的小常識</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2010-03-12%2Fpostid-446&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">DIY一個PHP留言板之讀取解析</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>昨天很高興的登入班網之後，卻發現……<br />
資料竟然又被改回來了！！<br />
（這可讓弦受到不小打擊呢！）<span id="more-102"></span>仔細一看，結果發現了一個細節問題……<br />
在 fbconnect.php 裡面，竟然還有「殘存」的部份沒被修正。<br />
而這次修改很簡單，只需要打開 fbconnect.php 找到下面的函式：</p>
<pre class="brush: php">
function fbc_update_facebook_data($force=false) {
  $last_cache_update = get_option(FBC_LAST_UPDATED_CACHE_OPTION);
  $delta = time() - $last_cache_update;
  if ($delta < 24*60*60 &#038;&#038; !$force) {
    return;
  }

  update_option(FBC_LAST_UPDATED_CACHE_OPTION,
                time());

  global $wpdb;
  $sql = "SELECT user_id, meta_value FROM $wpdb->usermeta WHERE meta_key = 'fbuid'";
  $res = $wpdb->get_results($wpdb->prepare($sql), ARRAY_A);
  if (!$res) {
    return -1;
  }

  $fbuid_to_wpuid = array();
  foreach($res as $result) {
    $fbuid_to_wpuid[$result['meta_value']] = $result['user_id'];
  }

  try {
    $userinfo = fbc_anon_api_client()->users_getInfo(
      array_keys($fbuid_to_wpuid),
      fbc_userinfo_keys());

  } catch(Exception $e) {
    return -1;
  }

  $userinfo_by_fbuid = array();
  foreach($userinfo as $info) {

    $wpuid = $fbuid_to_wpuid[$info['uid']];

    $userdata = fbc_userinfo_to_wp_user_used($info);
    $userdata['ID'] = $wpuid;

    wp_update_user($userdata);
  }

  return count($userinfo);
}
</pre>
<p>並且將其中的：</p>
<pre class="brush: php">
$userdata = fbc_userinfo_to_wp_user($info);
</pre>
<p>修正為：</p>
<pre class="brush: php">
$userdata = fbc_userinfo_to_wp_user_used($info);
</pre>
<p>那麼，就不會有問題了！<br />
不過各位可能會疑惑，這次是要做什麼的呢？</p>
<p>上一次修改的部份是「新增使用者」<br />
因此，假如比對到已經存在，就會進行登入。<br />
而 WP-Facebook Connect 這款插件，似乎還會做「更新」<br />
而只要碰到更新，就會把資料更新上來。<br />
因此，這次是讓更新部份變成正常。</p>
<p>之後，各位就可以享受 WordPress 結合 Facebook 的時光拉！<br />
而經過弦的使用，也決定替社團網站加上 Facebook 整合功能。</p>
<p>而且，還打算直接捨去 WordPress 原有的登入功能。<br />
後台登入就大大方方的顯示一個 Facebook Connect 按鈕！<br />
畢竟這樣還算挺方便的，雖然目前 WordPress + Facebook 沒有記憶時間的功能。<br />
不過我想修改一下就會有了～</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造簡記（登入更新資料修正）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-22%2Fpostid-663&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Array Sort (陣列排序)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-12%2Fpostid-636&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上一直忽略的小常識</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2010-03-12%2Fpostid-446&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">DIY一個PHP留言板之讀取解析</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/code/poston-2009-10-21/postid-102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-FBConnect 改造簡記（登入更新資料修正）</title>
		<link>http://blog.frost.tw/code/poston-2009-10-20/postid-100</link>
		<comments>http://blog.frost.tw/code/poston-2009-10-20/postid-100#comments</comments>
		<pubDate>Tue, 20 Oct 2009 10:50:05 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[程式語言]]></category>
		<category><![CDATA[FB]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[程式]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=100</guid>
		<description><![CDATA[昨天提到了 WordPress 使用 Facebook 帳號登入的技術。 不過預設的版本中，還有許多不好的設定。 如：每次登入都會把個人資料洗掉於是，我就想要來「修改」看看。 當然，最後是做出裡想的效果！ 於是，這是就分享一下我的修改方法。 首先，打開插件目錄裡面的 common.php 接著找到下面的函式： function fbc_userinfo_to_wp_user($userinfo) { return array( 'display_name' => fbc_get_displayname($userinfo), 'user_url' => fbc_make_public_url($userinfo), 'user_email' => $userinfo['proxied_email'], 'first_name' => $userinfo['first_name'], 'last_name' => $userinfo['last_name'], ); } 在其下新增一個新的函式，來調整被修改的項目。 function fbc_userinfo_to_wp_user_user($userinfo) { return array( &#8230; <a href="http://blog.frost.tw/code/poston-2009-10-20/postid-100">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造修正（登入更新資料）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-12%2Fpostid-636&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上一直忽略的小常識</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-03-02%2Fpostid-428&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">持續成長~</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-22%2Fpostid-663&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Array Sort (陣列排序)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>昨天提到了 WordPress 使用 Facebook 帳號登入的技術。<br />
不過預設的版本中，還有許多不好的設定。<br />
如：每次登入都會把個人資料洗掉<span id="more-100"></span>於是，我就想要來「修改」看看。<br />
當然，最後是做出裡想的效果！<br />
於是，這是就分享一下我的修改方法。</p>
<p>首先，打開插件目錄裡面的 common.php<br />
接著找到下面的函式：</p>
<pre class="brush:php">
function fbc_userinfo_to_wp_user($userinfo) {
  return array(
    'display_name' => fbc_get_displayname($userinfo),
    'user_url' => fbc_make_public_url($userinfo),
    'user_email' => $userinfo['proxied_email'],
    'first_name' => $userinfo['first_name'],
    'last_name' => $userinfo['last_name'],
  );

}
</pre>
<p>在其下新增一個新的函式，來調整被修改的項目。</p>
<pre class="brush:php">
function fbc_userinfo_to_wp_user_user($userinfo) {
  return array(
    'first_name' => $userinfo['first_name'],
    'last_name' => $userinfo['last_name'],
  );

}
</pre>
<p>在這裡，弦只讓姓氏和名字在每次登入被更新（預設是 信箱、網站、顯示名稱、姓氏、名字）<br />
如此一來，使用 Facebook 登入者，在留言時就可以依照喜好設定暱稱、個人網站、信箱。</p>
<p>接著尋找下面這句語法：</p>
<pre class="brush:php">
if (username_exists($fbusername)) {
</pre>
<p>並且把這句語法放到其前方</p>
<pre class="brush:php">
$userdata = fbc_userinfo_to_wp_user($userinfo);
</pre>
<p>接著要讓 $userdata 在新用戶時被更新完整資料<br />
所以把前面的語法改成如下：</p>
<pre class="brush:php">
  if (username_exists($fbusername)) {
    return FBC_ERROR_USERNAME_EXISTS;
  }else{
  	 $userdata = fbc_userinfo_to_wp_user($userinfo);
  }
</pre>
<p>而完成的函式應該如下：</p>
<pre class="brush:php">
function fbc_insert_user($fbuid) {

  $userinfo = fbc_anon_api_client()->users_getInfo(array($fbuid),
                                                   fbc_userinfo_keys());

  if ($userinfo === null) {
    error_log('wp-fbconnect: empty query result for user ' . $fbuid);
  }

  $userinfo = $userinfo[0];

  $fbusername = 'fb' . $fbuid;

  $userdata = fbc_userinfo_to_wp_user_used($userinfo);
  if (username_exists($fbusername)) {
    return FBC_ERROR_USERNAME_EXISTS;
  }else{
  	 $userdata = fbc_userinfo_to_wp_user($userinfo);
  }

  $userdata['user_pass'] = wp_generate_password();
  $userdata['user_login'] = $fbusername;

  $wpuid = wp_insert_user($userdata);
  if($wpuid) {
    wp_update_user(array('ID' => $wpuid,
                         'role' => 'subscriber'));
    update_usermeta($wpuid, 'fbuid', "$fbuid");
  }

  return $wpuid;
}
</pre>
<p>附註： WordPress 標籤解析關係， $fbusername 變數應為 $fbusername = &#8216;fb&#8217; . $fbuid; （請小心）</p>
<p>如此一來，每次登入只有姓名會被改動，其餘都是正常。<br />
*這樣也會更加方便！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-21%2Fpostid-102&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WP-FBConnect 改造修正（登入更新資料）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-12%2Fpostid-636&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上一直忽略的小常識</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-03-02%2Fpostid-428&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">持續成長~</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2010-08-22%2Fpostid-663&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2009-10-20%2Fpostid-100">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Array Sort (陣列排序)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/code/poston-2009-10-20/postid-100/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

