I am sending put request from iGoogle Gadget :
function fetchData() {
var params = {};
var prefs = new gadgets.Prefs().getString("url");
alert(prefs);
var key = (prefs.split("=")[1]).split("&")[0];
var url = "https://spreadsheets.google.com/feeds/cells/" + key +
"od6/private/full/R2C2";
var data = "<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gs='http://schemas.google.com/spreadsheets/2006'>" +
"<id>" + cellUrl + "<link rel='edit'
type='application/atom+xml' href='" + cellUrl + "'/>" +
"<gs:cell row='2' col='2' inputValue='300'/>" +
"</entry>";
params[gadgets.io.RequestParameters.CONTENT_TYPE] =
"application/atom+xml";
params[gadgets.io.RequestParameters.POST_DATA] =
gadgets.io.encodeValues(data);
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.PUT;
gadgets.io.makeRequest(url, function (response) {
alert('done');
}, params);
}
This is showing me error :
The gadget you are looking for is not valid.
What is the problem ?
--
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en.