Closed ghost closed 13 years ago
Okay looking at the Twitter API, they require the status parameter to be a query string parameter for instance http://api.twitter.com/1/statuses/update.xml?status=jsOAuth%20rocks
in order to do this in jsOAuth at the moment, you'll need to use the request method and set the appendQueryString parameter to true, like this: oauth.request({ method: 'POST', url: 'http://api.twitter.com/1/statuses/update.json', data: {'status': 'jsOAuth rocks'}, success: function (data) { console.log(JSON.parse(data.text);); }, appendQueryString: true });
In a later version of jsOAuth I'll add better URL handling to handle these scenario.
but why is it working in Titanium?
I've not got it to work in Titanium either, could you provide the code (without the keys and secrets) you are using, along with the version of jsOAuth you are using?
I have did it, like you mailed me.
var oauth = new OAuth({ consumerKey: '', consumerSecret: '', accessTokenKey: '', accessTokenSecret: '' });
oauth.post("http://api.twitter.com/1/statuses/update.xml",{'status':'test'},function (data) { console.log(data); },function (data) { console.log(data); });
Could you try v0.7.5.1?
works with get and post in firefox( with Privilege true) and also in Titanium (without the privilege option)
Excellent
hey, following fail in firefox with debug mode, while it works in Titanium:
oauth.post("http://api.twitter.com/1/statuses/update.xml",{'status':'test'},function (data) {console.log(data);},function (data) {console.log(data);});
The respone of the twitter server is: Incorrect signature. Regards jume