I found one problem in your gadget .xml file.
ModulePrefs/OAuth/Service/Authorization element is not correct.
*<Authorization
url="https://www.google.com/**accounts/OAuthAuthorizeToken?**oauth_callback=
http://oauth.gmodules.com/**gadgets/oauthcallback"; />*
Value of parameter oauth_callback should point to the domain which would
handle the responses from service providers. In your case, it should be the
domain/IP of your local host.
my 2 cents.

Gerald

On Fri, Feb 27, 2009 at 11:45 PM, <[email protected]> wrote:

> Hi,
>
>
>
> I am a newbie to OAuth.  I am trying OAuth gadgets using shindig
> (Windows OS).  I am referring the following url.
>
>
>
> http://code.google.com/apis/gadgets/docs/oauth.html
>
>
>
> I have configured Shindig in my localhost.  I am using the xml provided
> in the above url without any change.  I have hosted the xml in my
> shindig folder under gadgets/file/samplecontainer/examples folder.  The
> following are the code snippets from my xml file.
>
>
>
> ////////       ModulePrefs OAuth Tag             ///////////
>
>
>
>  <ModulePrefs title="OAuth Contacts" scrolling="true">
>
>    <Require feature="opensocial-0.8" />
>
>    <Require feature="locked-domain"/>
>
>    <OAuth>
>
>      <Service name="google">
>
>        <Access
> url="https://www.google.com/accounts/OAuthGetAccessToken"; method="GET"
> />
>
>        <Request
> url="https://www.google.com/accounts/OAuthGetRequestToken?scope=http://w
> ww.google.com/m8/feeds/" method="GET" />
>
>        <Authorization
> url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=
> http://oauth.gmodules.com/gadgets/oauthcallback"; />
>
>      </Service>
>
>    </OAuth>
>
>  </ModulePrefs>
>
>
>
> ////////////////////////  Data Fetch Method's Parameters
> ///////////////////
>
>
>
>      url =
> "http://www.google.com/m8/feeds/contacts/default/base?alt=json";;
>
>      params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> gadgets.io.ContentType.JSON;
>
>      params[gadgets.io.RequestParameters.AUTHORIZATION] =
> gadgets.io.AuthorizationType.OAUTH;
>
>      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] =
> "google";
>
>      params[gadgets.io.RequestParameters.OAUTH_USE_TOKEN] = "always";
>
>      params[gadgets.io.RequestParameters.METHOD] =
> gadgets.io.MethodType.GET;
>
>
>
> I have configured shindig's "oauth.json" file under
> "WEB-INF/classes/config" folder.
>
> I got the consumer key & secret for registering my domain using the url
> :  https://www.google.com/accounts/ManageDomains.
>
> I am using HMAC_SHA1 as method type.  The following is the code snippet
> from the "oauth.json" file.
>
>
>
> {"////  My localhost xml file path under /file/samplecontainer/examples
> /////" : {
>
>  "google" : {
>
>      "consumer_key" : "my consumer key",
>
>      "consumer_secret" : "my consumer secret",
>
>      "key_type" : "HMAC_SYMMETRIC"
>
>    }
>
>  }
>
> }
>
>
>
> After all the changes, when I try to render my gadget in my localhost, I
> am getting "Null" value for 'oauthApprovalUrl' & sometimes I got
> "parameter_absent" error also.
>
>
>
> Is there anything more needs to be configured or changed in my code. I
> may be missing something in the code. What may be the problem?
>
>
>
> Thanks and Regards,
>
> Razak K
>
>
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>

Reply via email to