Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:33:53+00:00 2026-06-12T14:33:53+00:00

I want to follow a twitter user on a button click. I used the

  • 0

I want to follow a twitter user on a button click. I used the share kit follow me method using oauth. But always I am getting this error.

{“error”:”Could not authenticate with
OAuth.”,”request”:”/1/friendships/create/priyankav89.json”}

Then I tried to implement it myself

NSURL *url = [NSURL URLWithString:@"https://api.twitter.com/1/friendships/create.json"];
NSMutableDictionary *dict=[[NSMutableDictionary alloc]init];
[dict setObject:@"871252998" forKey:@"user_id"];
[dict setObject:@"true" forKey:@"follow"];
[dict setObject:@"KXL0jFLJY6RI4lszOz8r5w" forKey:@"consumer"];
NSString *jsonRepresentation=[dict JSONString];
NSLog(@"jsonRepresentation = %@",jsonRepresentation);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:3];
NSData *postData=[NSData dataWithBytes:jsonRepresentation.UTF8String length:[jsonRepresentation length]];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setValue:[NSString stringWithFormat:@"%d", [postData length]] forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody:postData];
NSURLResponse *response;
NSError *error=nil;
NSData *responseData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSLog(@"respon = %s",responseData.bytes);

still I am getting the same error.

I searched a lot. Still no use. I don’t want to load the url in a UIWebView or in safari. I want to support the app from ios4. So ios5 built-in twitter app cannot be used.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:33:55+00:00Added an answer on June 12, 2026 at 2:33 pm

    I found the problem. In share kit follow me method they are not calling the authorization method before following. So we want to call authorize before login and save the access token.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a Follow a button like Twitter Follow in JQuery, Json
I want to know that how to follow a page on Twitter using android
I am using Twitter OAuth. When a user clicks on link on my website,
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
I want to implement a functionality similar to Who to follow in twitter or
so i want to follow the mvc conventions but haven't really got the hang
I am trying to build a twitter-like follow mechanism. User takes an action. We
I am using the Tweetstream gem to retrieve statuses from Twitter. This works: Tweetstream::Client.new('user',
I am using MGTwitterEngine for integrate Twitter on my iPhone application. so i want
I want to follow TDD, but the command grails test-app CUT needs almost a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.