Ios7 我在STTwitter上工作,我有一个问题如下

Ios7 我在STTwitter上工作,我有一个问题如下,ios7,Ios7,我试图以这种方式,它不会进入shareTW方法的成功块,并得到一个类似“错误创建状态”的错误。我遵循了一些教程,但不幸的是,它们无能为力 -(iAction)Btn_推特imgbutton:(id)发送方 { } { -(无效)详细信息 { twitterString=@“TwitterLoggeDin” } -(无效)股份转让 { NSString*Str=[self.tweetTextView text];NSLog(@“Str%@”,Str) }我刚刚更改了-(void)sharetoTW

我试图以这种方式,它不会进入shareTW方法的成功块,并得到一个类似“错误创建状态”的错误。我遵循了一些教程,但不幸的是,它们无能为力

-(iAction)Btn_推特imgbutton:(id)发送方

{

}

{

-(无效)详细信息 { twitterString=@“TwitterLoggeDin”

}

-(无效)股份转让 {

NSString*Str=[self.tweetTextView text];NSLog(@“Str%@”,Str)


}

我刚刚更改了-(void)sharetoTW中的post方法,工作正常

-(void)sharetoTW
{

NSString *Str=[self.placeholdertextview text];
NSLog(@"str %@",Str);

NSLog(@"placeholder text %@",self.placeholdertextview.text);
STTwitterAPI *twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];
     dispatch_async(dispatch_get_main_queue(), ^{
    [twitter verifyCredentialsWithSuccessBlock:^(NSString *username)
     {
         [twitter postStatusUpdate:Str
                 inReplyToStatusID:nil
                          latitude:nil
                         longitude:nil
                           placeID:nil
                displayCoordinates:nil
                          trimUser:nil
                      successBlock:^(NSDictionary *status)
         {
             NSLog(@"Success Block");
         }
            errorBlock:^(NSError *error)
          {
              NSLog(@"error ====%@",[error localizedDescription]);

        }];


     }
         errorBlock:^(NSError *error)
     {
         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Twitter Accounts" message:@"There are no Twitter accounts configured. You can add a Twitter account in your phone's Settings." delegate:self                                                       cancelButtonTitle:@"Ok"  otherButtonTitles:nil];
         [alert show];

     }];

});

}
-(IBAction)Tweet Button:(id)sender
if ([twitterString isEqualToString:@"twitter loggedin"])
{

    STTwitterAPI *twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];

    [twitter verifyCredentialsWithSuccessBlock:^(NSString *username)
     {
         //   [self postTWDetails];
     }
                                    errorBlock:^(NSError *error)
     {
         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Twitter Accounts" message:@"There are no Twitter accounts configured. You can add a Twitter account in your phone's Settings." delegate:self                                                       cancelButtonTitle:@"Ok"  otherButtonTitles:nil];
         [alert show];
     }];

    [self sharetoTW];
}}
isTwitter = YES;
NSLog(@"tweetTextView text %@",self.tweetTextView.text);
STTwitterAPI *twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];

[twitter verifyCredentialsWithSuccessBlock:^(NSString *username)
 {
    [twitter postStatusUpdate:Str inReplyToStatusID:nil mediaURL:[NSURL URLWithString:@"https://www.google.com"] placeID:nil latitude:nil longitude:nil successBlock:^(NSDictionary *status)
      {
          NSLog(@"Success block");
      }
                    errorBlock:^(NSError *error)
      {
          NSLog(@"str %@",Str);
          NSLog(@"error ====%@",[error localizedDescription]);
      }];

 }
                                errorBlock:^(NSError *error)
 {
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Twitter Accounts" message:@"There are no Twitter accounts configured. You can add a Twitter account in your phone's Settings." delegate:self                                                       cancelButtonTitle:@"Ok"  otherButtonTitles:nil];
     [alert show];

 }];
-(void)sharetoTW
{

NSString *Str=[self.placeholdertextview text];
NSLog(@"str %@",Str);

NSLog(@"placeholder text %@",self.placeholdertextview.text);
STTwitterAPI *twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];
     dispatch_async(dispatch_get_main_queue(), ^{
    [twitter verifyCredentialsWithSuccessBlock:^(NSString *username)
     {
         [twitter postStatusUpdate:Str
                 inReplyToStatusID:nil
                          latitude:nil
                         longitude:nil
                           placeID:nil
                displayCoordinates:nil
                          trimUser:nil
                      successBlock:^(NSDictionary *status)
         {
             NSLog(@"Success Block");
         }
            errorBlock:^(NSError *error)
          {
              NSLog(@"error ====%@",[error localizedDescription]);

        }];


     }
         errorBlock:^(NSError *error)
     {
         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Twitter Accounts" message:@"There are no Twitter accounts configured. You can add a Twitter account in your phone's Settings." delegate:self                                                       cancelButtonTitle:@"Ok"  otherButtonTitles:nil];
         [alert show];

     }];

});

}