Open page via web if app is not installed in react native - react-native

The best example that I can think of to describe this is how VSCO does this, if you click someone's VSCO profile link, from an Instagram bio or something, you get the page via web, at the bottom of the webpage it asks you if you would rather use the app, if its installed, clicking yes will open, if its not it will link to the download page. I really don't even know where to start with the development of this so really any links and terms that I can look into are helpful.
Sorry for the somewhat open-ended question but at a loss as to where to start. If it is all using the same firebase database, could I do this all in one react native code base? Or would I want a standalone web application. Thanks ahead of time.

Related

React Native send email with link to web app or mobile app

I am trying to implement deep linking into this app. The app is a React Native Expo app, and is served on web, iOS and Android. There are a bunch of things we want to achieve with this i.e. link to specific things in the app such as certain messages etc. But currently my primary focus is just to navigate to general screens like 'Home', 'Messages', 'Login' etc.
I have been testing and so far, I can enter the URIs such as exp://host:port/--/login and they work as expected.
However, I know and understand that this will not work in a web browser on my laptop for example.
So my question is, how do I send an email to a user let's say after they have verified their account, prompting them to login, with a link that will for one, take them to the web app if they are on desktop, and two open the mobile app if they have it installed on their phone?
And just as an example, let's imagine my deep link URI is myapp://login
Thanks for any help.
EDIT
After looking around some more, I am deciding to consider the possibility of linking to the web app, and upon the web app loading, linking to the mobile app if they have it installed.
Given this, what is the best way to handle this?
You can follow one of the next approaches.
Validate the request origin and based on that generate the link for
an specific platform.
Generate as much links as platform are currently serving you app.
Like: Link to iOS, Link to Android and Link To web
You can design image buttons for each one to make it prettier

How to make API for website that is not mine and also requires a login?

I'm trying to create a react native app that uses data from a website that is not mine. I need to enter a login and password to get into this website.
I was thinking about using a web scraper on the backend to accomplish this, but I wasn't sure this was the best approach or even possible. How should I go about doing this?
If you could find the API from the network tabs, then use that API instead. Web Scrapers are more prone to be unstable, you wouldn't want to change the scraper again and again if someone from the website changes something in their UI. Reach out for API first, scraper should be your last option.

Branch.io architecture query

I have the following requirement and based on the branch docs I cannot get myself a straight answer.
We want to enable deep links that if the user has the app installed that it uses them and if not redirects to download then redirects.
If the user is on a desktop they get redirected to a page to download app.
We want to control all the actual deep linking using react navigation config and wanted to know how we can pair the two!? The guides are very poorly written and makes understanding the flow a nightmare.
Some guidance and suggestions on how best to accomplish this would be great.
P.s. are the links generated that when app found it takes the prefix and replaces with appname:// ??
Your requirement for deep linking can be handled with Branch, you can set the URI schemes of the apps under the link settings of your Branch dashboard and also mention your app on PlayStore/Appstore for the user to download the app when clicked on the link.Similarly you can add the redirection URLs for the scenarios when your link is clicked on a desktop.
Alternatively you can use our React SDK to create links with all these link properties and even more. More details here.
The handling of the deep link data and redirecting the user to the desired page can be found here.
If you wish to know more about how Branch passes data through to the app and attributes app sessions, check this.

Using Branch links to deeplink to unpublished app

I'm working as a web developer for a start-up that has a andriod app prototype. I'm not an app developer ( still learning) so I'm a little unsure how to approach this.
I wanted to deeplink the app to the webpage. I came across this solution called Branch.io . It looks like exactly what we need but I'm not sure how to link it with an unpublished app. Maybe I'm missing something. Any advice would be greatly appreciated.
The Branch service actually doesn't depend on the App or Play Store at all. The link will first try to open up the app, but fallback to the store pages if not installed. You can override this fallback to any website, and the links will still function as usual.
To test an app not in the Play Store, first choose 'Custom URL' in the Link Settings dashboard, and fill in the page you'd like to send users when the app is not installed. It's common for people to send users to either their home page or TestFlight app.
Then, to test the deep linking through install and download tracking, just do the following:
Create a Branch link
Click it on your phone or on simulator and wait to be redirected
Run the app from Android Studio/Eclipse
Here are some more testing considerations. Happy linking.

Bare bones Facebook integration demo app

So I just started looking into integrating FB into my app and whipped up this little test app. I wanted to have a bare bones app without all of the bs that's in the Hackbook demo app. Basically, it's overly complicated for what I want.
The problem is that something I'm doing isn't working. My app tries to authenticate with FB, but doesn't return auth tokens. Something else that I noticed is that...
If I have the facebook app installed... it switches to it, shows a white loading screen for a second, then dismisses it and pops back to my app.
If the facebook app isn't installed... it will open in safari and actually show the app approval window, let me login and then it pops back to my app.
Both ways fail with getting and storing the auth tokens however.
What the heck am I doing wrong? Would someone mind seeing if this code works for them?
Full source here: Deleted.
Thanks for looking.
It definitely sounds like you don't have your app registered in the Facebook developer portal.
https://developers.facebook.com/apps
Looks like Facebook just updated their SDK which now includes some simplified example apps. Much better than just hackbook.