1

I have tried to add the retweet concept in my application using STTwitter API with following method after user authentication:

[twitter postStatusRetweetWithID:[NSString stringWithFormat:@"691544087921606656"] successBlock:^(NSDictionary *status) {
       NSLog(@"status..%@",status);
   } errorBlock:^(NSError *error) {
       NSLog(@"error..%@",error);
   }];

But it is showing following error:

Error Domain=STTwitterTwitterErrorDomain Code=220 "Your credentials do not allow access to this resource." UserInfo={NSUnderlyingError=0x7b170ca0 {Error Domain=STHTTPRequest Code=403 "HTTP Status 403: Forbidden" UserInfo={NSLocalizedDescription=HTTP Status 403: Forbidden}}, NSLocalizedDescription=Your credentials do not allow access to this resource.}

If anyone has experienced with the STTwitter API. Suggest me some idea to get rid from this error.

Thanks in advance.

Avijit Nagare
  • 8,482
  • 7
  • 39
  • 68
Vishal
  • 8,246
  • 6
  • 37
  • 52
  • 1) This code works for me, I could retweet this tweet with my test account https://twitter.com/nst022 2) I cannot spot any error in your code, although you don't need -[NSString stringWithFormat:] you can simply use @"691544087921606656" 3) Maybe there's something wrong with your credentials. What's the result of -[STTwitterAPI verifyCredentialsWithUserSuccessBlock:errorBlock:]? – nst Jan 28 '16 at 20:53

0 Answers0