我创建了一个游乐场应用程序。 我看到它在我的谷歌硬盘中创建快捷方式文件。 我试图与隐姓埋名共享它(因为我希望文档可供任何人使用,而且不知道如何创建另一个谷歌帐户,所以我登录到隐姓埋名)。 共享链接类似于https://drive.google.com/open?id=0B00--A0eRH1JLTdsX2t0LWw5RE0 。 但是,隐姓埋名无法查看。 它说“没有预览可用”应该是它的谷歌驱动器窗口,并提供登录
我看到的关键问题是,游乐场应用程序具有以下结构,来自官方演示
function onAuthorized() { function onFileLoaded(doc) {display(doc)} gapi.drive.realtime.load(your_doc_id, onFileLoaded) } // App entry point -- start by authorization gapi.auth.authorize({ client_id: rtClientId, scope: ['install', 'file'], //user_id: userId, immediate: !popup }, onAuthorized );在显示任何文档之前,它似乎首先要求身份验证。 对于我希望我的应用程序可用的无符号模式,授权是有问题的。 我希望共享一个文件,并使其可以向公众查看,而无需登录。如果隐身用户能够查看或事件编辑我的文档,则会引发一个问题。 我还关注如何在需要时将文档复制到他们的帐户:有一件事是当您使用我的应用程序在驱动器上创建文件时,您可以列出文件并使用drive.copy api复制所需的文件和其他内容时你想复制一个谷歌硬盘上没有的文件,你唯一拥有的是它的id。
顺便说一句,您能告诉我哪个帐户用于其他帐户的非隐身测试吗? 如果我在一个帐户中创建文档,我想看看它是如何从另一个帐户看起来/可访问的。
I have created a playground application. I see that it creates shortcut files in my google drive. I tried to share it with incognito (because I want the doc to be available to anybody and do not know how to create another google account, so I log out into incognito). The shared link looks like https://drive.google.com/open?id=0B00--A0eRH1JLTdsX2t0LWw5RE0. But, incognito fails to view it. It says that "No preview avaialable" in what is supposed to be its google drive window and offers the log in
The key problem that I see is that playground application has the following structure, which comes from the official demo
function onAuthorized() { function onFileLoaded(doc) {display(doc)} gapi.drive.realtime.load(your_doc_id, onFileLoaded) } // App entry point -- start by authorization gapi.auth.authorize({ client_id: rtClientId, scope: ['install', 'file'], //user_id: userId, immediate: !popup }, onAuthorized );which seems to demand authentication in the first place before displaying any doc. Authorization is problematic for the unsigned mode that I want my app to be available. I want to share a file and make it viewable to the general public, without the need to log in. This raises a question if incognito users are able to view or event edit my document. I also concern how to copy the doc to their account if desired: one thing is when you have created a file on your drive with my app, you can probably list the files and use drive.copy api to copy desired one and other thing when you want to copy a file that is not available on your google drive and the only thing you have is its id.
BTW, can you tell me which account to use for non-incognito testing from another account? If I create the document in one account I want to see how it looks/accessible from the another.
最满意答案
默认情况下,Realtime API不提供匿名访问。 请参阅https://developers.google.com/google-apps/realtime/faq#does_the_realtime_api_support_anonymous_access
The Realtime API does not provide anonymous access by default. See https://developers.google.com/google-apps/realtime/faq#does_the_realtime_api_support_anonymous_access
更多推荐
发布评论