What is chrome.identity.getProfileUserInfo meant to return?

吃可爱长大的小学妹 提交于 2020-01-01 04:55:27

问题


With Chrome 37 now released, there is a new API available, identity.getProfileUserInfo. I am not really sure what information this is meant to return or what it represents.

From the documentation, I thought it would return the email address and id of the user signed into Chrome(i.e. from the hamburger menu), however this is not really true- when I call it(from the context of an extension, which requests the "identity" permission), I get the id of the user signed in that way(and if I paste that after plus.google.com/ I get their G+ page), but the email field is blank. Is that intended?


回答1:


Figured it out. There is an undocumented (in the official developer.chrome.com docs at least) need to request the "identity.email" permission as well in order for that field to be filled. https://groups.google.com/a/chromium.org/forum/#!topic/apps-dev/WS-5GRw0RkI



来源:https://stackoverflow.com/questions/25546846/what-is-chrome-identity-getprofileuserinfo-meant-to-return

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!