Hello,
Does the Twitter API fully support the osapi.http methods defined in
the OpenSocial 0.9+ spec?
When I use the older (now deprecated) method
"gadgets.io.makeRequest(url, callback, params)" and I haven't yet
granted access to the gadget, the object returned contains
response.oauthApprovalUrl, which is where I redirect the user to.
However, when I use osapi.http.get(params).execute(callback) and I
haven't yet granted access to the gadget, the returned JSON object
just informs of a generic error:
[{"id":"http.get","error":{"message":"internalError: String index out
of range: 0","code":500}}]
Here's the exact code I'm calling:
var callback = function(response) {
if (response.oauthApprovalUrl) { ... }
};
osapi.http.get({
'href' : '
http://api.twitter.com/1/account/
verify_credentials.json',
'format' : 'json',
'authz' : 'oauth',
'oauth_service_name' : 'twitter'
}).execute(callback);
It seems to me that the Twitter API isn't returning the proper
information. Any ideas?
Thanks,
Dennis