问题
I cannot manage to see a contextual gadget in Gmail after Test Install Flow in Google Apps Marketplace SDK.
These are the steps I took to create the project, logged as a domain administrator:
- create Google Apps console project
- create OAuth2 client
- enable GAM SDK
configure the SDK page with COB extension:
- Extractor Url: google.com:HelloWorld
- GadgetUrl: URL of gadget spec
- Extractor param name: Test
- Extractor param value: .*
- Scopes: Mail - Subject Line, Mail - Message Body
I didn't add any additional Oauth2 scopes than the userinfo.email and userinfo.profile that are already there, and the Universal Navigation link is just a file that redirects to Gmail( since I am trying a very simple variant of the project to see if I can get it to work ).
I press Test Install flow, I am asked to give permissions in a Oauth combined window, I am redirected to my Universal navigation link, then Gmail. The app appears in the Google Apps Admin control panel and seems to have installed successfully, it is ON for all domain users.
I tried Gmail with different domain users, cleared cache, logged out and back in to Gmail, I am probably missing a configuration somewhere.
This is the gadget spec:
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Title" description="Desc" author="" author_email="" author_location="" scrolling="false" height="20">
<Require feature="dynamic-height"/>
<Require feature="google.contentmatch">
<Param name="extractors">
google.com:HelloWorld
</Param>
</Require>
</ModulePrefs>
<Content type="html" view="card">
<![CDATA[
<script type="text/javascript">
<!-- Fetch the array of content matches. -->
matches = google.contentmatch.getContentMatches();
var matchList = document.createElement('UL');
var listItem;
var extractedText;
for (var match in matches) {
for (var key in matches[match]) {
listItem = document.createElement('LI');
extractedText = document.createTextNode(key + ": " + matches[match][key]);
listItem.appendChild(extractedText); matchList.appendChild(listItem); }
}
document.body.appendChild(matchList);
gadgets.window.adjustHeight(100);
</script>
]]>
</Content>
</Module>
回答1:
Couple of suggestions -
- Use the nocache option to force your Gmail UI to update. Use this link - https://mail.google.com/mail/u/0/?nogadgetcache=1#inbox
- Try as a different account on the domain. I've seen some cases where the "developer/admin" inbox takes time to update
来源:https://stackoverflow.com/questions/20679729/gmail-contextual-gadget-doesnt-appear-after-gam-sdk-test-install