ios - Action after tweet has been published -


i set button in game can tweet score. thing when user publishes tweet want open new view , don't know how know when tweet has been published. publish tweet used code:

-(void)sharetwitter { if ([slcomposeviewcontroller isavailableforservicetype:slservicetypetwitter]) {     slcomposeviewcontroller *tweetsheet = [slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypetwitter];      [tweetsheet setinitialtext:[nsstring stringwithformat:@"i've scored 98 points!];      uiviewcontroller *controller = self.view.window.rootviewcontroller;     [controller presentviewcontroller:tweetsheet animated:yes completion:nil];  } 

}

you can set completion handler on tweetsheet so:

[tweetsheet setcompletionhandler:^(slcomposeviewcontrollerresult result) {           switch (result) {              case slcomposeviewcontrollerresultcancelled:                  nslog(@"post canceled");                  break;              case slcomposeviewcontrollerresultdone:                  nslog(@"post sucessful");                  break;               default:                  break;          }      }]; 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -