How to open twitter page in twitter app from my iphone app?

后端 未结 5 1792
一向
一向 2021-02-04 01:44

The page I want to open using twitter app:

https://twitter.com/#!/PAGE

To open twitter app I use the following code:



        
5条回答
  •  礼貌的吻别
    2021-02-04 02:26

    @Alexey: If you just want to know how to launch twitter from your application do this:

    NSURL *urlApp = [NSURL URLWithString: [NSString stringWithFormat:@"%@", @"twitter://"]];
       if ([[UIApplication sharedApplication] canOpenURL:urlApp]){
            [[UIApplication sharedApplication] openURL:urlApp];
       }else{
            UIAlertView *appMissingAlertView = [[UIAlertView alloc] initWithTitle:@"Twitter App Not Installed!" message:@"Please install the Twitter App on your iPhone." delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok",nil];
            [appMissingAlertView show];
            [appMissingAlertView release];
        }
    

提交回复
热议问题