Install Gadget button

Place a button inside the gadget where the user can install the gadget on his own profile.

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Check Viewer permission" summary="" description="" author="" author_email="" thumbnail="" screenshot="" height="380">
  <Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html">
  <![CDATA[
  <div id='content'></div>
  <br>
  <script type="text/javascript"> 
  var InstallRequest = function() {
    opensocial.requestInstallApp;
  }
  </script>
  <input type="button" value="install gadget" onClick="InstallRequest();">
  ]]>
</Content>
</Module>

Example install (Make sure you're not in OpenSocial Sandbox mode)

Example file