Hi all,
i am creating a music application in which i am integrating twitter in my application When a user clicks on particular song and then he click on the twitter tab the login page of twitter should be displayed. after entering the username and password he should be directed to the page where he can enter his comment and then post it.the problem is that when i click on twitter tab the login page is diplayed but when i enter he username and password and click on submit it does not redirect me to the page where i can post my comment. Here is my 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 i am ajeet";
//[twitterMessageText resignFirstResponder];
loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Posting To 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 and Password" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
[alert show];
[alert release];
}
}