We are using the following library: 
http://oauth.googlecode.com/svn/code/obj-c/OAuthConsumer

Signature base string is created in file: 'http://oauth.googlecode.com/
svn/code/obj-c/OAuthConsumer/OAMutableURLRequest.m', method: '-
(NSString *)_signatureBaseString;'

Signature base string:
POST&https%3A%2F%2Fapi.twitter.com%2F1%2Ffriendships
%2Fcreate.xml&oauth_consumer_key%XXXXXXXXXXXXXXXXXXXXX%26oauth_nonce
%3D28451170-543E-44CC-9554-118E69C0EDAB%26oauth_signature_method
%3DHMAC-SHA1%26oauth_timestamp%3D1309432652%26oauth_token%3D179876397-
xcJcDpijQ7Mde1QCGfTUHdLLbxWovkQhCiqXdDA%26oauth_version%3D1.0

On Jun 30, 9:27 am, kamesh SmartDude <kamesh.smartd...@gmail.com>
wrote:
> Hai,
>
> what is the signature base string u are using to generate the
> siganture....are u using any library(i think u are develoing this for
> iPhone) for get the data?
>
> //kamesh
>
> On Wed, Jun 29, 2011 at 10:38 PM, Howard Gutowitz <howard.gutow...@gmail.com
>
>
>
> > wrote:
> > Specifically I have:
>
> > 'account/verify_credentials.xml' finishes with HTTP 200
> > All other requests work fine. Only 'friendships/create.xml' and
> > 'friendships/delete.xml request fails with the following error:
>
> > <?xml version="1.0" encoding="UTF-8"?>
> > <hash>
> >  <error>Could not authenticate with OAuth.</error>
> >  <request>/1/friendships/create.xml?screen_name=rosariodawson</
> > request>
> > </hash>
>
> > Request's header
> >    Authorization = "OAuth realm=\"\",
> > oauth_consumer_key=\"XXXXXXXXXXXXXXXXXXXXX\", oauth_token=\"179876397-
> > xcJcDpijQ7Mde1QCGfTUHdLLbxWovkQhCiqXdDA\", oauth_signature_method=
> > \"HMAC-
> > SHA1\", oauth_signature=\"Gl7u0xZ3iGRKPS%2BFMNHBTB0Gwkg%3D\",
> > oauth_timestamp=\"1309173898\", oauth_nonce=\"26DA6912-F3CC-40A6-B746-
> > B4F18135C321\", oauth_version=\"1.0\"";
> >    "X-Twitter-Client" = TwTool;
> >    "X-Twitter-Client-Url" = "http://www.eatoni.com/";;
> >    "X-Twitter-Client-Version" = 1;
>
> > Response's header
> >    "Cache-Control" = "no-cache, max-age=1800";
> >    Connection = "Keep-Alive";
> >    "Content-Encoding" = gzip;
> >    "Content-Type" = "application/xml; charset=utf-8";
> >    Date = "Mon, 27 Jun 2011 11:27:20 GMT";
> >    Expires = "Mon, 27 Jun 2011 11:57:20 GMT";
> >    "Keep-Alive" = "timeout=15, max=100";
> >    Server = hi;
> >    "Set-Cookie" = "k=213.108.72.42.1309174040693549; path=/;
> > expires=Mon,
> > 04-Jul-11 11:27:20 GMT; domain=.twitter.com,
> > guest_id=130917404070357573;
> > path=/; expires=Wed, 27 Jul 2011 11:27:20 GMT,
> > _twitter_sess=BAh7CDoHaWQiJTcyZmM4ZTk0ODkzMThkZjZjY2FhNzIxMjMwNjQ2ZTVlIgpm
> > %250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG
> > %250AOgpAdXNlZHsAOg9jcmVhdGVkX2F0bCsIhoja0DAB
> > --bc92ade75da0322e48b793fbee2dff7ad914b087; domain=.twitter.com;
> > path=/;
> > HttpOnly";
> >    Status = "401 Unauthorized";
> >    "Transfer-Encoding" = Identity;
> >    Vary = "Accept-Encoding";
> >    "Www-Authenticate" = "OAuth realm=\"https://api.twitter.com\"";;
> >    "X-Runtime" = "0.00949";
>
> > On Jun 27, 6:09 pm, vishal <vishal....@gmail.com> wrote:
> > > I am having trouble posting to twitter from my ruby on rails app. The
> > > consumer keys and secrets are correct, also the oauth token and secret
> > > seem to be fine. The code used to work fine but I have been getting
> > > these error since today morning. Is anyone facing the same issue or am
> > > I going wrong anywhere?
>
> > > client = Twitter::Client.new(
> > >                         :consumer_key => 'XXXXXXXXX',
> > >                         :consumer_secret => 'XXXXXXXXXXXXXX',
> > >                         :oauth_token => "XXXXXXXXXXXXXX",
> > >                         :oauth_token_secret => "XXXXXXXXXXXXXXXXXXXX",
> > >                          :endpoint => 'https://api.twitter.com')
>
> > > #<Twitter::Client:0x104ae9e30 @user_agent="Twitter Ruby Gem 1.1.2",
> > > @proxy=nil, @endpoint="https://api.twitter.com";,
> > > @search_endpoint="https://search.twitter.com/";, @format=:json,
> > > @consumer_key="XXXXXXXXXXXX", @oauth_token_secret="XXXXXXXXXXXXXXXX",
> > > @adapter=:net_http, @oauth_token="XXXXXXXXXXXXXXXXXXXX",
> > > @consumer_secret="XXXXXXXXXXXXXXX">
>
> > > client.update "post message"
>
> > > Twitter::Unauthorized: POSThttps://api.twitter.com/statuses/update.json:
> > > 401: Could not authenticate with OAuth.
>
> > > Thanks
> > > Vishal Kajjam
>
> > --
> > Twitter developer documentation and resources:https://dev.twitter.com/doc
> > API updates via Twitter:https://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> >https://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> >https://groups.google.com/forum/#!forum/twitter-development-talk

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to