问题
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