問題描述
我想創建一個使用 Google Drive Realtime API 的網頁,允許用戶匿名編輯多個文本字段.因為可能有多個用戶同時訪問該頁面,所以我想防止某人的編輯被另一個用戶覆蓋,而第一個編輯者不知道他的編輯被覆蓋了.
I want to create a web page that uses Google Drive Realtime API that allows users to anonymously edit several text fields. Because more than one user may be accessing the page simultaneously, I want to prevent someone's edit from being overwritten by another user without the first editor knowing that his edit is overwritten.
但是,從快速入門看來,人們似乎需要使用 Google 帳戶進行授權開始編輯.是否可以讓任意用戶編輯我的實時模型,而無需登錄?類似于讓公眾編輯 Google Docs 電子表格.
However, from the quick start, it seems that authorization using Google Account is needed for people to start editing. Is it possible to let arbritrary user edit my realtime model, without the need of logging in? Something similar to letting a Google Docs Spreadsheet be edited by the public.
推薦答案
目前只有偽匿名模式可用.您可以將文件公開發布,或提供給任何有鏈接的人.但是,用戶需要使用 Google 帳戶登錄才能進行編輯.
Right now only psuedo-anonymous mode is available. You can make files available publicly, or to anyone with a link. However, the user will need to log in with a Google account in order to edit.
對于文檔中的其他用戶,他們顯示為匿名用戶.這是當前使用 isAnonymous 的地方.
They appear as an anonymous user to the other users in the document. This is where isAnonymous is currently used.
這篇關于如何讓匿名用戶編輯 Google Drive Realtime 文檔?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!