mderazon / node-deeplink Goto Github PK
View Code? Open in Web Editor NEWEasily create an endpoint in your web server that redirects deep links to mobile apps
License: MIT License
Easily create an endpoint in your web server that redirects deep links to mobile apps
License: MIT License
In addition to setting the fallback url as an option when setting up the endpoint, give the ability set the fallback url from a query param.
When a request comes GET /deep?url=...&fallback=...
, if a fallback is available in the query params, use it instead of the hard coded fallback address from the options. Otherwise, use the options fallback.
Hey,
Thanks for the great package. We haven't updated our codebase for a while (everything was working just fine before), but now I have noticed that on iOS when the default browser is Safari - you never get redirected to the app. You just go to the App store (the app is installed).
If I set my default browser to chrome - it works just fine. It also doesn't work as expected on Opera though.
And - Safari used to work fine some time ago, but that was probably the case before iOS 14.
Hey,
I am a newbie at node and javascript. If you could help me out here that would be great.
I am getting the attached dialog when I hit the deeplink url.
I have made a deeplink function in the core server middleware. Whenever the server hits http://localhost:3000/deeplink\* the following gets executed. The url query parameter is encoded but still this issue persists.
exports.deeplink = function(req, res, next) {
var link = deeplink({
fallback: 'http://' + req.headers.host,
ios_store_link: 'https://itunes.apple.com/us/app/cups-unlimited-coffee/id556462755?mt=8&uo=4',
});
link(req, res, next);
};
I have different path rules that I can open App Store or not open.
If i want to open the App Store when my app is not installed to my phone, I just set the ios_store_link
. But if I want to redirect to fallback url instead of opening the App Store, I omit the ios_store_link
.
This is possible on ios but not on android.
There is a critical vulnerability in html-inline caused by security issues on several modules, most of them abandoned or unmaintained.
I've taken care of that by removing html-inline and reimplementing this task.
I will provide a PR
Hello,
I dont' understand why should I send url in params while doing a get request to my server. Here's my code for example.
app.get('/deeplink', deeplink({
fallback: 'https://www.my-site.com',
android_package_name: 'com.my-site.gramlopa',
ios_store_link: 'https://itunes.apple.com/us/app/my-site'
}))
Why should I send url in params ?
it said in the documentation
so when users will open it the app will open with app://account deeplink or the users will be redirected to download the app in case they don't have it.
So does account should be the apple id of the user in case of the user is using an Apple device and doesn't have the app ?
Thanks
I have created one http server and listening on port 2000.My deeplink is http://host:2000/deep?url=fb
Now My server is handling request as
var http = require('http');
var deeplink = require('node-deeplink');
http.createServer(handleRequest).listen(2000);
function handleRequest(request, response){
try {
//log the request on console
console.log(request.url);
if(request.url=="/deep"){
console.log("deeplink:- "+deeplink);
deeplink({
fallback: 'https://na.nofer.com',
android_package_name: 'com.na.nofer'
});
}
} catch(err) {
console.log(err);
}
}
app is not installed in my android device .once i have requested in android browser ,request is landing but it is not directing to nieghter fallback nor app store.
Can some one suggest on same.
Goes straight to fallback
I am trying to do "Connect Instagram" in my React Native iOS app. Instagram API doesn't allow URL schemes as valid redirect_uri's, so I assume I need to redirect to my server first, then use this library to redirect back to my app.
First I set up the URL scheme in xcode as: myapp
Then I am able to hit: myapp://
In Instagram Manage API, I set the redirect_uri to: https://myserver.com/linkinstagram?url=myapp%3A%2F%2F
My server has:
app.get('/linkinstagram', deeplink({
fallback: 'https://myfallback.com'
}));
However hitting https://myserver.com/linkinstagram?url=myapp%3A%2F%2F
ends up going to the fallback. I tried this in iOS simulator as well as on an actual device. Any suggestions?
I get this message Cannot GET /deeplink
I just testing my deeplink implementation, that working fine on Android 4 and Android 5, but found the deeplink is not working properly on Nexus 5 with Android marshmallow. It seems the redirection does not work anymore on Android 6.
Using node-deeplink, Firefox on android constantly redirects to the web version of the play store in an infinite loop.
I have not experienced this issue on other android browsers such as Chrome, Opera, webview.
Firefox version: 68.7.0
node-deeplink version: 0.6.0
Fallback in query params is not working as expected
https://dev-api.monhapp.com/deeplink?url=app://account&fallback="www.google.com" this link redirect to "https://dev-api.monhapp.com/"www.google.com"
What should I send in fallback so that this will ridirect to www.google.com
router.get(
'/deeplink',
deeplink({
fallback: 'https://xxxxxx',
android_package_name: 'com.mbs.XXXXX',
ios_store_link:
'https://apps.apple.com/in/app/tXXXXX'
})
);
I am using this code , but it doesn't redirect anywhere
I just making some simple project with node-deeplink packatge. it work only when i open it with my phone browser (non-chrome) . but it keep throwing me to the application store, dispite of when i have the app, it should opening the app directly right ? or there is someting i missing with the 'smart' link ?
I am trying to pass the request parameter to the URL. But it is returning undefined.
var express = require('express');
var deeplink = require('node-deeplink');
var app = express();
let anuncioId;
app.get(
'/anuncio/:codigo',
function (request, response, next) {
anuncioId = request.params.codigo;
console.log('primeiro ' + anuncioId)
return next();
},
deeplink({
url: detroca.app://detroca/anuncio/${anuncioId}
,
fallback: 'https://www.detroca.com.br',
android_package_name: 'com.app.detroca',
title: Anuncio: ${anuncioId}
})
);
app.listen(3000);
console.log('deeplink service listening on port 3000');
I'm trying access the url directly from google chrome on my phone and it just stays on a blank page. After some research, I found out that the problem is with android_intent it's missing S.browser_fallback_url parameter. here's the full var:
var android_intent = 'intent://' + path + '#Intent;scheme=' + scheme + ';package=' + androidPackageName + ';S.browser_fallback_url=' + fallback + ';end;'
For some reason on android just nothing happens.
Only in fallback desktop browser is executed
Can anyone tell me what's going on?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.