Hello,
I'm having a problem when using signed makeRequest on apache shindig.
The same code works fine in others OpenSocial containers like Orkut.
The code that is getting the erros is bellow.
var params = {};
params[gadgets.io.RequestParameters.METHOD] =
gadgets.io.MethodType.POST;
params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.TEXT;
params[gadgets.io.RequestParameters.AUTHORIZATION] =
gadgets.io.AuthorizationType.SIGNED;
params[gadgets.io.RequestParameters.POST_DATA] = data;
var callback = function(data) {
alert("ok");
}
gadgets.io.makeRequest(url, callback, params);
The message that shindig is returning by firebug is:
throw 1; < don't be evil'
>{"http://localhost:3000/politicos/23/avaliacoes":{"headers":{},"oauthError":"BAD_OAUTH_CONFIGURATION","body":"","rc":403}}
And on shiding log the stack bellow is showed:
Sep 3, 2009 11:02:48 PM org.apache.shindig.gadgets.oauth.OAuthFetcher
buildErrorResponse
WARNING: OAuth error
org.apache.shindig.gadgets.GadgetException: No key for gadget
http://localhost:3000/orkut.xml and service
at
org.apache.shindig.gadgets.oauth.BasicOAuthStore.getConsumerKeyAndSecret(BasicOAuthStore.java:167)
at
org.apache.shindig.gadgets.oauth.GadgetOAuthTokenStore.getOAuthAccessor(GadgetOAuthTokenStore.java:94)
at
org.apache.shindig.gadgets.oauth.OAuthFetcher.lookupOAuthMetadata(OAuthFetcher.java:161)
at
org.apache.shindig.gadgets.oauth.OAuthFetcher.fetch(OAuthFetcher.java:174)
at
org.apache.shindig.gadgets.http.ContentFetcherFactory.fetch(ContentFetcherFactory.java:54)
at
org.apache.shindig.gadgets.servlet.MakeRequestHandler.fetch(MakeRequestHandler.java:84)
at
org.apache.shindig.gadgets.servlet.MakeRequestServlet.doGet(MakeRequestServlet.java:55)
at
org.apache.shindig.gadgets.servlet.MakeRequestServlet.doPost(MakeRequestServlet.java:65)
Anyone knows what it could be?
Tiago Albineli Motta
Desenvolvedor de Software - Globo.com
http://programandosemcafeina.blogspot.com