
語言 🇹🇼 繁體中文
🇺🇸
English
🇧🇬
Български
🇨🇳
简体中文
🇹🇼
繁體中文
🇭🇷
Hrvatski
🇩🇰
Dansk
🇳🇱
Nederlands
🇺🇸
English (US)
🇨🇦
Français (Canada)
🇫🇷
Français (France)
🇩🇪
Deutsch
🇨🇾
Ελληνικά (Κύπρος)
🇬🇷
Ελληνικά
🇮🇱
עברית
🇮🇹
Italiano
🇯🇵
日本語
🇰🇷
한국어
🇵🇱
Polski
🇧🇷
Português (Brasil)
🇷🇺
Русский
🇺🇦
Русский (Украина)
🇧🇦
Српски (БиХ)
🇷🇸
Srpski (Latinica)
🇲🇪
Српски (Црна Гора)
🇷🇸
Српски
🇸🇮
Slovenščina
🇪🇸
Español
🇺🇦
Українська
🇹🇷
Türkçe
Memberstack 安裝
Add Comments With Memberstack
結合 FastComments 與 Memberstack,我們可以設定僅限會員的專屬評論!
程式碼 
我們可以透過一小段程式碼輕鬆地將 FastComments 與 Memberstack 連接起來:
FastComments Memberstack Snippet
Copy 

1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script>
3<div id="fastcomments-widget"></div>
4<script>
5 window.$memberstackDom.getCurrentMember().then(({data: member}) => {
6 if (member) {
7 FastCommentsUI(document.getElementById('fastcomments-widget'), {
8 tenantId: "demo",
9 urlId: window.location.pathname,
10 simpleSSO: {
11 username: member.customFields.name || member.auth.email.replace(/@.+/, ''),
12 email: member.auth.email,
13 avatar: member.customFields.avatar
14 }
15 });
16 } else {
17 FastCommentsUI(document.getElementById('fastcomments-widget'), {
18 tenantId: "demo",
19 urlId: window.location.pathname,
20 simpleSSO: null
21 });
22 }
23 })
24</script>
25
當使用者透過 Memberstack 登入後訪問您的網站或應用程式時,他們將自動登入到 FastComments,其留言
將被標記為 Verified。
如果未登入,他們也可以透過留下姓名和電子郵件來發表留言。
僅限會員留言
如果您希望實現僅限會員留言,請嘗試以下程式碼片段,但將 https://example.com/login 更改為您希望使用者點擊 Login 按鈕時跳轉的位置:
Exclusive FastComments Memberstack Snippet
Copy 

1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script>
3<div id="fastcomments-widget"></div>
4<script>
5 window.$memberstackDom.getCurrentMember().then(({data: member}) => {
6 if (member) {
7 FastCommentsUI(document.getElementById('fastcomments-widget'), {
8 tenantId: "demo",
9 urlId: window.location.pathname,
10 simpleSSO: {
11 username: member.customFields.name || member.auth.email.replace(/@.+/, ''),
12 email: member.auth.email,
13 avatar: member.customFields.avatar
14 }
15 });
16 } else {
17 FastCommentsUI(document.getElementById('fastcomments-widget'), {
18 tenantId: "demo",
19 urlId: window.location.pathname,
20 simpleSSO: {
21 loginURL: 'https://example.com/login'
22 }
23 });
24 }
25 })
26</script>
27
網域錯誤 
您可能會收到如下授權錯誤:
缺少網域配置
這是因為 FastComments 不知道應該允許您的帳戶在此網域上使用。
在這種情況下,解決方法很簡單。您只需將您的網站添加到您的 FastComments.com 帳戶即可。
自訂 
FastComments 旨在進行自訂以匹配您的網站。
如果您想添加自訂樣式或調整配置,請查看我們的自訂文檔了解如何操作。