Oh and i almost forgot : This is how i build my authorization header field var data = "OAuth oauth_nonce="+nonce+", oauth_signature_method="+oauth_signature_method+", oauth_timestamp="+time+", oauth_consumer_key="+consumer_key+", oauth_token="+accessor.oauth_token+", oauth_signature="+ encodeURIComponent(signature)+", oauth_version="+oauth_version;
On Apr 29, 6:43 pm, galeyte <[email protected]> wrote: > And my application is in "desktop" mode > > On Apr 29, 6:41 pm, galeyte <[email protected]> wrote: > > > > > > > > > I don't use any oauth library, i just a sha1 one. > > > here is my code for mentions : > > var parameters = ["oauth_consumer_key="+consumer_key, > > "oauth_nonce="+nonce, > > "oauth_signature_method="+oauth_signature_method, > > "oauth_token="+accessor.oauth_token, "oauth_timestamp="+time, > > "oauth_version="+oauth_version] > > var baseString = getBaseString(parameters, nonce, time, "GET", > > "https://api.twitter.com/1/statuses/mentions.json"); > > var signature = b64_hmac_sha1(consumer_secret + "&" + > > accessor.oauth_token_secret, baseString); > > > This is the function that generates the baseString : > > > function getBaseString(parameters, nonce, time, method, url) { > > parameters = parameters.sort(); > > var join = parameters.join("&"); > > var joindparameters = encodeURIComponent(join); > > var baseString = method + "&" + encodeURIComponent(url) + "&" + > > joindparameters; > > return baseString; > > > } > > > It's the same code i use to get my timeline. > > > On Apr 29, 6:17 pm, Taylor Singletary <[email protected]> > > wrote: > > > > Can you provide any examples of the signature base string you're using for > > > this request? (It's often obscured by OAuth libraries, but you should be > > > able to intercept it in one of the intermediary signing steps) > > > > @episod <http://twitter.com/episod> - Taylor Singletary > > > > On Fri, Apr 29, 2011 at 8:10 AM, galeyte <[email protected]> wrote: > > > > Hi, > > > > > I'm developing a qml/js based application for twitter. > > > > I can connect, get my timeline, even post twitt but i've got "401 > > > > Could not authenticate you" problem when i call > > > >https://api.twitter.com/1/statuses/mentions.json. > > > > > I'm doing the same request as i do when i'm getting my timeline, using > > > > the token i get when i log in with the application. > > > > > There must be something i'm missing but i cant find out what. > > > > > Thx > > > > > -- > > > > Twitter developer documentation and resources:http://dev.twitter.com/doc > > > > API updates via Twitter:http://twitter.com/twitterapi > > > > Issues/Enhancements Tracker: > > > >http://code.google.com/p/twitter-api/issues/list > > > > Change your membership to this group: > > > >http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
