@codexteam/deeplinker
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@codexteam/deeplinker", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Tiny script that helps you upgrade links to open apps directly if it is possible", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# Deeplinker | ||
Tiny script that helps you upgrade links to open apps directly if it is possible. | ||
This module helps you to create links to open pages in apps directly if it is possible. Otherwise web page will be opened. | ||
You can use deeplinking system to open apps by links with custom schemes. [Instagram's deeplinks docs](https://www.instagram.com/developer/mobile-sharing/iphone-hooks/) as an example. | ||
![](assets/open-telegram-demo.png) | ||
@@ -39,5 +39,9 @@ ## Install | ||
Let's imagine that you want to create a link that opens some page in application, if it is installed. If target application is missing then link should open a web page as a normal link. | ||
Check out example schemas below. | ||
### On click | ||
Call `deeplinker.click(element)` function. Element should contains the following params: | ||
Call `deeplinker.click(element)` function. Element should contain the following params: | ||
@@ -65,3 +69,3 @@ - `data-link` or `href` with a usual link | ||
If you want to try open app silently then call `deeplinker.tryToOpenApp(deepLink)`. | ||
If you want to try to open app silently then call `deeplinker.tryToOpenApp(deepLink)`. | ||
@@ -76,4 +80,40 @@ Could be useful for redirection or invitation pages. | ||
## Schemas of popular apps | ||
### Telegram | ||
``` | ||
tg://resolve?domain=[username] | ||
``` | ||
``` | ||
twitter://user?screen_name=[username] | ||
``` | ||
``` | ||
instagram://user?username=[username] | ||
``` | ||
``` | ||
fb://profile/[id] | ||
``` | ||
### VK | ||
``` | ||
vk://vk.com/[id] | ||
``` | ||
## Issues and improvements | ||
Feel free to ask a question or improve this project. | ||
## License | ||
MIT |
69495
8
117