I am trying to get the email address of a Chrome user via an Extension.
chrome.identity.getProfileUserInfo(function(userInfo)
{szEm=userInfo.email;}
)
if (szEm==undefined)
return -1;
else
return szEm;
This always returns a blank userInfo.email and blank id. Here is the manifest.json. I have seen other answers up here where the questioner doesn't have identity as a permission. You can see that's not true in this case.
{
"manifest_version": 2,
"key": "hhbacecbkfkibifccmofpbjhkgkjilen",
"name": "R+D Substantiator",
"description": "This extension logs Research activities",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"background": {
"scripts": ["background.js"],
"persistant": false
},
"permissions": [
"activeTab",
"identity",
"identity.email",
"https://ajax.googleapis.com/auth/userinfo.email",
"http://localhost/*.*"
],
"oauth2":{
"client_id": "koinkhimjmddddjlmfplohggjnnmifin",
"scopes": ["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/userinfo.email"]
}
I have also found trouble using the Developer Tool. I notice that I need to log off google and log back in prior top running a test. But besides that it is the blank email that is stopping me.
Any ideas?