objective c - problem with logging in twitter through my iphone application -
i creating music application in integrating twitter in application when user clicks on particular song , click on twitter tab login page of twitter should displayed. after entering username , password should directed page can enter comment , post it.the problem when click on twitter tab login page diplayed when enter username , password , click on submit not redirect me page can post comment. here code:
- (ibaction) submit: (id) sender
{
// g=text3.text.integervalue; u=text1.text; p=text2.text; int flag; nslog(@"username,%d",u); //if((u!=@"") || (p!=@"")) //if((text1.text.length >= 20 && range.length !=0) ||(text2.text.length >= 8 && range.length!=0)) if([text1.text length] != 0 || [text2.text length]!=0) { twitterrequest * t = [[twitterrequest alloc] init]; t.username =[nsstring stringwithformat: @"%@",u]; //nsstring *username=[nsstring stringwithformat:@"%d",u]; t.password= [nsstring stringwithformat: @"%@",p]; //nslog(@"password,%d",p); //@"ajeetyaday"; //t.username= @"ajeetyaday"; //t.password = @"gopalpur"; //nsstring *name1 =[nsstring stringwithformat:@"%d",g] //twittermessagetext.text=@" hi ajeet"; //[twittermessagetext resignfirstresponder]; loadingactionsheet = [[uiactionsheet alloc] initwithtitle:@"posting twitter..." delegate:nil cancelbuttontitle:nil destructivebuttontitle:nil otherbuttontitles:nil]; [loadingactionsheet showinview:self.view]; [t statuses_update:twittermessagetext.text delegate:self requestselector:@selector(status_updatecallback:)]; //[twitterrequest statuses_update:twittermessagetext.text delegate:self requestselector:@selector(status_updatecallback:)]; } else { uialertview *alert = [[uialertview alloc] initwithtitle:@"clicked on submit" message:@"please inter username , password" delegate:nil cancelbuttontitle:@"cancel" otherbuttontitles:nil]; [alert show]; [alert release]; }
}
i think u r in wrong way!!
u store user name , password in global variable,and push posting page
(ibaction) submit: (id) sender {
user_name=uname.text; password=password.text;
twitter *controller = [[twitter alloc] init]; [self.navigationcontroller pushviewcontroller:controller animated:yes]; [controller release];
}
Comments
Post a Comment