Giter Club home page Giter Club logo

Comments (7)

bytespider avatar bytespider commented on June 20, 2024

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.

from jsoauth.

 avatar commented on June 20, 2024

but why is it working in Titanium?

from jsoauth.

bytespider avatar bytespider commented on June 20, 2024

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?

from jsoauth.

 avatar commented on June 20, 2024

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);
});

from jsoauth.

bytespider avatar bytespider commented on June 20, 2024

Could you try v0.7.5.1?

from jsoauth.

 avatar commented on June 20, 2024

works with get and post in firefox( with Privilege true) and also in Titanium (without the privilege option)

from jsoauth.

bytespider avatar bytespider commented on June 20, 2024

Excellent

from jsoauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.