Custom URL schemes in twitter messages do not work

I am an ios application developer. We have implemented a custom URL scheme "my_app: // section_name" or where, if the link is open in the user's mobile browser, it will redirect the user to a specific section of the application.

We would like to be able to tweet these URLs and click on them on our mobile device to open the application, however it just can click once (when you click close, maybe you will click incorrectly, then you want to click it second, but this will not work)

Hope this is not a too stupid question. Thanks

+5
source share
3 answers

Be sure to check the body of the tweet after posting it.

This could be due to a shortened URL, especially if the tweet is hosted on iOS 5 Twitter.

0
source

I have a problem with url schemes. We can include them in emails and text messages, and they stand out and work properly.

Unfortunately, when we do the same with the tweet, the iOS Twitter client cannot recognize the special URL scheme, and therefore the user cannot click on it to open our application.

Quite a lot of supervision, he says. Has anyone else had any fun including special URL scheme links in tweets?

0
source

The solution you should consider is not to share the URI scheme directly, but to create a page on your web server for this. In fact, if you want to be able to exchange full URI schemes with paths, it is better to create a web server to dynamically generate the page with the URI scheme redirected.

This is an oversimplified view of what we created in Branch . This includes some code to get started, although the web server will require a bit of customization, not described here.

  1. instead of testapp: //some.data.here you will refer to http://yoursite.com/hosted-redirect/some.data.here .

  2. your server should listen to the / hosted-redirect route, take some.data.here and build the following page (body here):

code
(source: derrrick.com )

Thus, your server will need to generate and respond with this page by filling out some.data.here at any time when http://yoursite.com/hosted-redirect/some.data.here is requested

A lightweight node application can do this with a single file.

0
source

All Articles