Open Link on Twitter App IOS

4k views Asked by At

I have created a mail template on mailchimp. It consists of a twitter link. But an IPad or an IPhone user clicks on the link from his/her mail, the twitter link opens in the browser instead of the twitter app.

This does not happen in Android.

Any workarounds?

2

There are 2 answers

2
keji On BEST ANSWER

If you use a custom URL <a href="twitter://" than other Android/Desktop devices won't be able to open it. Twitter doesn't redirect with standard URLs from Safari and they should. But they do offer a "Open in app" button at the top left.

So if you want you could add two buttons in the email. One specifically for iOS: twitter://status?id=373205208664272897 and one for other devices https://twitter.com/support/status/373205208664272897.

Or you could create a site that reads the user agent of the device than determines which URL to redirect to.

The third option is just leaving it alone given that it's not really such a big issue in the grand scheme.

2
Daniel Storm On
NSString *stringURL = @"twitter://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

From iPhone URL Schemes.