Home > Enterprise >  How to open YouTube/Facebook/Instagram link in the native application instead of the browser?
How to open YouTube/Facebook/Instagram link in the native application instead of the browser?

Time:09-17

I have a responsive website in React.js with a link a YouTube video, like this:

<a href="https://www.youtube.com/watch?v=_vPAoaRPi2k">Open video</a>

And when someone is visiting it with a mobile phone I want to, instead of just redirect in the browser to YouTube page, open the video in YouTube App (if is installed in the device). Also, I need the same for Facebook or Instagram post.

Is there any way to do it?

CodePudding user response:

There is a plugin for it

https://www.npmjs.com/package/react-open-app

Its called deep link, so you need to pass url and if the same application is installed in your device it will open the application otherwise open the link browser.

  • Related