
言語 🇯🇵 日本語
🇺🇸
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
はじめに
ドキュメント
使用法
FastComments React Native Library
これは FastComments の公式 React Native ライブラリです。
React Native 用 FastComments のコメントウィジェット
リポジトリ
インストール 
npm install react-native-webview@13.6.4 --save
npm install fastcomments-react-native --save
注: 2024年7月時点で react-native-webview にバグがあるようです。そのため 13.6.4 に固定するのが最良です - 最新のパッチバージョンを取得するために ^ を使わないでください。
ネイティブ SDK を検討する 
このライブラリは、VanillaJS ライブラリをラップする webview を使用しています。
FastComments は現在、fastcomments-react-native-sdk の一部としてクライアントの完全なネイティブ実装をサポートしています。 完全にネイティブな実装を希望する場合は、そちらをご覧ください。
使用法 - ライブコメントウィジェット 
The APIはfastcomments-reactと比べて若干異なります。ネイティブでは、次の構造に従う設定オブジェクトを渡します: this structure。
import { FastCommentsCommentWidget } from 'fastcomments-react-native';
// ...
const myTenantId = 'demo'; // あなたのテナントID。https://fastcomments.com/auth/my-account/api-secret から取得できます
const myAppPageId = 'native-test'; // アプリ内のコメントスレッドのIDまたはURL。
const myAppPageUrl = 'https://example.com/external-page'; // 外部ページのURLを任意で設定できます
const myAppPageTitle = 'Example Title'; // そして、おそらくこのコンテンツのタイトルが必要でしょう
const [config, setConfig] = useState({
tenantId: myTenantId,
urlId: myAppPageId,
url: myAppPageUrl,
pageTitle: myAppPageTitle
});
// by calling setConfig(), we can do things like change the current page, or the currently logged in user
// example/src/App.tsx を参照してください
return (
<FastCommentsCommentWidget config={config}/>
);
使用法 - ライブチャットウィジェット 
import { FastCommentsLiveChatWidget } from 'fastcomments-react-native';
// ...
const myTenantId = 'demo'; // あなたのテナントID。https://fastcomments.com/auth/my-account/api-secret から取得できます
const myAppPageId = 'native-test'; // アプリ内のコメントスレッドのIDまたはURL。
const myAppPageUrl = 'https://example.com/external-page'; // 外部ページのurlを任意で設定できます
const myAppPageTitle = 'Example Title'; // ...そしておそらくこのコンテンツのタイトルを設定したいでしょう
const config = {
tenantId: myTenantId,
urlId: myAppPageId,
url: myAppPageUrl,
pageTitle: myAppPageTitle
};
return (
<FastCommentsLiveChatWidget config={config}/>
);
使用法 - SSO(シングルサインオン) 
FastComments はセキュアSSOに HMAC を使用します。使用するには、バックエンドで SSO オブジェクト(sso 設定プロパティ)を作成し、それを
コメントウィジェットに渡してください。
さまざまなバックエンド向けの例は、こちらで確認できます: https://github.com/FastComments/fastcomments-code-examples/tree/master/sso
ヘルプが必要ですか?
React Native ライブラリで問題が発生したり質問がある場合は、次のいずれかを行ってください:
貢献
貢献は歓迎します!貢献ガイドラインについてはGitHubリポジトリをご覧ください。