1.0.2 • Published 4 years ago

instagram-deeplink v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Codecov Coverage

Instagram Deeplink

Installation

npm i instagram-deeplink

Usage

  1. Add this middleware:
app.use('/insta', instagramDeeplink);
  1. Chill 😎.

You can skip first argument to make middleware work from root path

How it works

Content typeUser visitsiOSOthers
Profilehttps://your_host.com/insta/usernameinstagram://user?username=usernamehttps://instagram.com/username
Posthttps://your_host.com/insta/p/B6f78z7jr42/instagram://media?id=B6f78z7jr42https://instagram.com/p/B6f78z7jr42/
Hashtaghttps://your_host.com/insta/explore/tags/js/instagram://tag?name=jshttps://instagram.com/explore/tags/js/
Locationhttps://your_host.com/insta/explore/locations/213174824/instagram://location?id=213174824https://instagram.com/explore/locations/213174824/

Example

Simple example is provided in /service folder.

import * as express from 'express';
import { instagramDeeplink } from 'instagram-deeplink';

const app = express();
app.use('/insta', instagramDeeplink);
app.listen(3000, function () {
  console.log('Try to visit http://<your_ip>:3000/insta/username from your iOS device to open @username instagram profile directly in the app');
});