Tue Nov 17 2026
...
使用 FastComments 为您的评论添加实时投票
新功能
This release adds Live Polls. A poll is attached to a comment and renders inside it. Readers click an option to vote, without leaving the thread, and the results update live for everyone viewing the page as votes come in. No refresh, and nobody has to tally replies by hand.
Since the poll is a comment, the conversation stays attached to it. People vote, then reply to say why.
创建投票
When polls are on, the comment editor gets a poll button. Clicking it opens a poll editor under the text input, where you set:
- The question, up to 200 characters.
问题,最多 200 个字符。 - The options, 2 to 10 of them.
选项,2 到 10 个。 - When it closes: never, or after 1 day, 3 days, or 1 week. A closed poll shows its final results and stops taking votes.
关闭时间:永不,或在 1 天、3 天或 1 周后关闭。关闭的投票会显示最终结果并停止接受投票。 - Privacy: anonymous, visible to admins, or public.
隐私:匿名、管理员可见或公开。 - Require Vote to See Results, which keeps the results hidden from each viewer until they vote or the poll closes.
需要投票后才能查看结果,在投票或投票关闭前对每个查看者隐藏结果。
Then write your comment and post it as usual. Polls work on new comments and on replies.
投票
Each person gets one vote per poll, and can change it while the poll is open. Unless the poll requires a vote first, readers can click Show results to see where things stand before they pick.
Privacy is set per poll and shown right under the options, so voters know who can see their vote before they cast it. Anonymous polls (the default) only show totals, and nobody, admins included, can see who voted for what. On admin-visible polls, admins and moderators can open See who voted. On public polls, anyone can.
开启投票
Polls are off by default. Open your Widget Customization, check Enable Polls, and pick who can create them:
- Admins/Moderators Only (the default), for when you want to run the polls yourself.
仅管理员/版主(默认),当您想自行运行投票时。 - Everyone, for when you want your community asking each other.
所有人,当您希望社区成员相互提问时。
Voting requires a logged in user by default. Check Allow Anonymous Poll Votes to let anyone vote. To keep that fair, anonymous votes are limited to three per IP address per poll per hour.
Like every customization rule, this can apply to your whole site, a domain, or a single page.
通知
The author of a poll hears about responses as they come in: a notification, grouped when lots of people vote at once, and a daily email when the poll got new responses that day. Only a first vote counts as a response, so someone changing their mind doesn't send more. The notifications follow the poll's privacy, so an anonymous poll only says how many new responses arrived, never who.
原生移动 SDK
Polls aren't only in the web widget. Our native SDKs render the poll card, the poll editor, the live results, and the voter list with real native components, and they read the same widget settings from your dashboard. Turn polls on once and they show up on your site and in your apps.
- iOS: fastcomments-ios 2.1.0, through Swift Package Manager.
iOS:fastcomments-ios 2.1.0,通过 Swift 包管理器。 - Android: fastcomments-android 2.1.0, as
com.fastcomments:android-sdk:2.1.0.
Android:fastcomments-android 2.1.0,使用com.fastcomments:android-sdk:2.1.0。 - React Native: fastcomments-react-native-sdk 5.3.0, on NPM.
React Native:fastcomments-react-native-sdk 5.3.0,发布在 NPM。
The iOS and Android SDKs can also post a poll from your own UI. On iOS it looks like this:
The READMEs for iOS and Android, and the React Native changelog, cover the details, including how to restyle the poll colors to match your app.
API
Polls are in the REST API too. You can create a poll along with its comment by passing poll to POST /api/v1/comments,
or add, edit, close, and remove one later with /api/v1/polls/:commentId. Votes can be listed, cast, and removed with
/api/v1/poll-votes, which makes exporting results into a spreadsheet or your own CMS straightforward. The API follows
the same settings as the widget, and individual votes on anonymous polls can't be read through it.
开销
The poll code isn't loaded unless polls are enabled, so it doesn't slow down the comment widget for anyone else.
文档
The Live Polls guide covers enabling polls, who can create them, anonymous votes, voter privacy, notifications, and the API.
试一试
There's a live poll on the Live Polls demo. Vote on it, open the page in a second tab, and watch the results move. You can post your own poll there too.
结论
If your threads keep turning into head counts, give polls a try and let us know below what you'd like to see next.
干杯!
