S
S
Scuba2018-09-12 08:01:46
JavaScript
Scuba, 2018-09-12 08:01:46

How to check if the Instagram app is installed on the phone?

I advertise on my Instagram profile. If a person in the Instagram feed clicks on an ad, he gets into an internal browser in which he is not authorized, therefore, conversions are lost.
Solution: Specify deep links.
For iPhone:
instagram://user?username=dmitry_gendir
For Android:

intent://instagram.com/_u/dmitry_gendir/#Intent;package=com.instagram.android;scheme=https;end

But if suddenly a person sees an ad, and he does not have the Instagram application installed on his phone, nothing will happen, in this case, we must redirect him to a regular URL
http://instagram.com/dmitry_gendir
: ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2018-09-13
@targetologru

You create iframe, you set the necessary link to it. At the same time, you create an setTimeout, in which you open a regular link if something went wrong. Next, you wait for the download iframe, if it boots, then delete it setTimeout. Thus, if the application is installed, then a link will open in it, if not, it will work setTimeout.

P
Pavel, 2018-09-12
@PavelMonro

There is this:
https://github.com/hampusohlsson/browser-deeplink And there are enough
options in Google for android check installed apps

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question