简体   繁体   中英

How to convert any social media link to redirect to their respective mobile applications?

I am planning to create a web application where people can convert their social media links so that their links will only open in the application. A great example for what I am looking for is url genius .

Notice how it creates protocol links for the corresponding links. 在此处输入图像描述 URL Genius almost supports most of the popular applications. I want to achieve the same functionality but was unable to find right resources.

So in a nutshell, how can I convert an ordinary link into their corresponding deeplink? Any help is appreciated.

Two options here that I would consider:

  • Let URL Genius' API do the work for you and just make an app that spits out the result

  • Do the work to find each corresponding deeplink

There's a good chance there's a database of deeplink URL prefixes, but URL Genius has a list of their supported sites on their API page . There's only around 20 types listed there, and I'm willing to bet some use the same link prefix. Based on that list's length, I'd guess it was probably handwritten. You could put in the same research to find those prefixes yourself, or you could use their API to avoid that.

As far as converting to a deeplink, most deeplinks I've seen are just the original link with the new prefix replacing http(s). I would start with that, run some tests, and manually fix the ones you find don't work. Again, assuming you want to meet URL Genius' number of supported sites, this shouldn't take that long because they only seem to support 20 or so sites.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM