Gmail contextual gadget doesn't appear after GAM SDK Test install

丶灬走出姿态 提交于 2020-01-23 02:42:10

问题


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> 

来源:https://stackoverflow.com/questions/20679729/gmail-contextual-gadget-doesnt-appear-after-gam-sdk-test-install

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