Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Oauth signing
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
naomi  
View profile  
 More options Aug 12 2010, 12:19 pm
From: naomi <mackinnonorp...@gmail.com>
Date: Thu, 12 Aug 2010 09:19:08 -0700 (PDT)
Local: Thurs, Aug 12 2010 12:19 pm
Subject: Oauth signing
hi,

I am having to update my method of posting to Twitter now that OAuth
is going to be compulsory. Here is what has worked out for me: adding
library OAuthCore (http://bitbucket.org/atebits/oauthcore)

then:

        NSString *consumerKey = @"consumer key";             //replacing
values accordingly
        NSString *consumerSecret = @"consumer secret";
        NSString *accessToken = @"access token";
        NSString *accessTokenSecret = @"access secret";
        NSString *method=@"POST";

        NSURL *url = [NSURL URLWithString:@"http://twitter.com/statuses/
update.xml"];   // API call as appropriate

        ASIFormDataRequest *request = [ASIFormDataRequest
requestWithURL:url];

        [request setPostValue:[tweetTextField stringValue] forKey:@"status"];

        [request buildPostBody];
        NSData *body = [request postBody];

        NSString *header = OAuthorizationHeader(url, method, body,
consumerKey, consumerSecret, accessToken, accessTokenSecret);

        [request addRequestHeader:@"Authorization" value:header];

Hope this helps anyone else in this situation. This is working in Mac
OS X 10.5

Any comments on the subject are welcome

thanks.

Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »