1.0.0 • Published 10 months ago

open-in-app v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

OPEN IN APP

Generate deep links for popular social media platforms (Facebook, Twitter, Instagram, TikTok, LinkedIn, YouTube) that open directly in the app on mobile devices. If the app is not installed, the links will automatically open in the default browser.

Features

Supports Facebook, Twitter, Instagram, TikTok, LinkedIn, and YouTube. Detects the platform (iOS/Android) and generates appropriate deep links. Automatically falls back to the default web browser if the app is not installed. Lightweight and easy to use.

Installation

You can install the package via npm:

Copier le code

npm install open-in-app

Usage

Generate a Deep Link from a URL You can generate a deep link by passing a URL, and the package will automatically detect the social media platform and create the appropriate link.

Copier le code

const { openinapp } = require('open-in-app');

const newlink = openinapp('https://www.tiktok.com/@dhakerabdesslem');
console.log(newlink);

window.location.href = newlink;

Supported Platforms

The package supports generating deep links for the following social media platforms:

Facebook Twitter Instagram TikTok LinkedIn YouTube The library will automatically fall back to opening the social media page in the browser if the app is not installed on the user's device.

1.0.0

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago