將 WordPress 預設留言板替換成 fb 留言板:
1. 到 developers.facebook.com 建立應用程式

2. 設定資料,填寫隱私權政策網頁和類別,切換成「上線」。
記下「應用程式編號」,稍後會用到。

3. 取得網頁內嵌入程式碼
前往取得程式碼

4. 到 WordPress 控制台\設定\佈景主題編輯器
編輯 Theme Header (header.php)

在 <head> 和 </head> 中間放入
<meta property=”fb:app_id” content=”{app_id}” />
{app_id} 改成自己的 APP 應用程式編號
<meta property="fb:app_id" content="{app_id}" />
複製 Step 2 程式碼

放在 header.php 的 <body> 和 </body> 中間。
編輯完畢,按下下方的「更新檔案」。


5. 到 WordPress 控制台\設定\佈景主題編輯器
編輯 Comments (comments.php)
複製 Step 3 程式碼,將 comments.php 的 <div id=”comments” class=”comments-area”> 和 </div><!– #comments —> 中間的程式碼都刪掉,替換成下面的程式碼
<div class="fb-comments" data-href="<?php the_permalink() ?>" data-numposts="5" width="100%"></div>
編輯完畢,按下下方的「更新檔案」 。

WordPress 預設的留言板已經被換掉,現在可以用 fb 帳號留言。
