I'm trying to have my App upload a file on Dropbox and I downloaded their DBRoulette test program but I found also there the strange behavior I'm now gonna explain
Basically once you push the button for authenticating the App and authorize it to link with your Dropbox there's a command the library provides which is
private DropboxAPI mApi;
mApi.getSession().startAuthentication(context);
Once this command is processed the native browser opens and shows the buttons Deny or Allow to accept or not the authorization, but the problem is that when you press it, the App comes back and shows itself while the native browser lies in the background, ready to appear again once you exit from the app and this is rather annoying (though it does it only the first time you launch the app)
p.s. before I forget I DO use in the onResume the following code which is suggested in the tutorial
session.finishAuthentication();
Thanks to anyone who will help me understand this problem better and (hopefully) solve it redirecting the authorization in a Webview OR closing the native browser once the button is pressed and the authentication is processed
Unfortunately, there is not much you can do about it.
The authentication process runs on the server-side, i.e. on Dropbox. That means that Dropbox defines the course of action for authenticating a user which you as the client have to follow. That's part of the idea of the OAuth authentication flow.
What I have experienced myself though is the fact that if you have the official Dropbox app installed, the app is used for authenticating the user (instead of the browser) and also gets closed after the user has pressed the allow/cancel button.
Related
For my app, users are invited by email to join.
Currently, the link in the email is opening the web-browser to a page where the user creates his password. Then, the user has to install the app, open the app, and log in with his email and the password he created.
I am trying to make the process easier. I am thinking that in the invitation email, the link can point to "an app link". I know iOS has "Universal Links". The app will most probably not be installed, so on iOS, it will open the App Store app to install the app.
I am thinking to create the registration process in the app. But the issue is after the user installs and opens the app, the "app link" is lost.
The "App Store" app does not pass the original link to the app when the user opens the app first time after install.
Without the information from the link, I am not able to know in the app the email for which the user needs to create the password. I could ask the user for email also, but I was hoping not having to ask him about that.
I guess it's the same for Android.
Any thoughts how to make sign-up process easier?
EDIT: I chose a correct answer but to anybody who might be looking for an answer, I don't think Firebase or anyone else has a 100% reliable way of making a connection between the device where the link was clicked and the device where the app is installed. All the libraries are using some accuracy value and asks you to check it in code. If you think about it, it makes sense, because when the link is clicked and gets open (and that can be in any web-browser app) the JS code needs to compute some hash of the device and it will try to compare it to the hash of the device computed by the app's code when app is open after install.
You can use Firebase Dynamic Links to achieve this.
Please refer Firebase Dynamic Links
i think you have to use Webview for this
You can do this with Appsflyer SDK.
Checkout the documentation https://www.appsflyer.com/blog/app-installation-referral-conversion-tracking/
In Branch.io, I created a branch and posted the link to Facebook successfully. Here is my configuration on branch.io dashboard:
This is the link on facebook:
I click on it, it redirects me to my app successfully. Within a few seconds of the bottom screen appear, my app starts:
Now, I return to facebook by closing my app and starting facebook - the facebook built in browser seems to be continuing with going to the custom URL of (www.yahoo.com):
Within a few seconds, yahoo opens:
I would have thought that once the redirect was successful, the Facebook built-in browser would have closed and when you return to facebook, facebook would appear. I would not have expected the built-in browser to continue with the custom url as though your app was not installed.
Is there a fix for this?
If you check in the settings for Facebook you will see by default, Links Open externally is set to off.
This is definitely a nuisance when it comes to deep links especially from Facebook.
I have never used branch.io but i am assuming it is able to intercept this behavior of the deeplink open the link externally, but this does not stop Facebook from trying to render in the browser without this turned off. And it is probably unrealistic to think your users will all have this turned off by default.
But for testing now, i would turn Links Open externally to on, and see if for the time being it helps stop the issue.
I have seen several flavours of this question going around but nothing exactly specific nor answered so trying it myself.
I am trying to build a Facebook login experience via the browser into my Facebook-based app that will require the users to not remember their passwords as much as possible. This means that if
they log in via their desktop browser and are already logged in, it will only ask them to 'OK' the permissions
they log in from their mobile browser and are logged in via their respective native app (Android/iOS), it will simply redirect them to the native app, ask for the app permissions and redirect them back to the success page on the browser
they log in from any browser and are not currently logged onto Facebook in any form, they have to enter their password and authenticate (whether natively or via browser this does not matter)
I know how the first can be done - that is pretty straightforward using the JS SDK. The second point is the tougher bit.
I am aware of existing custom URL schemes for Android and iOS but nothing specifically really mentions how that can be used for authentication and/or authorisation of Facebook apps. Does anyone have any ideas on how this can be done?
Thanks!
In iOS use iOS facebook SDK. It will handle the login process effectively in different situations depending on the resources available. Check out this answer to know about different login flows
Integrating facebook
You're looking for Single Sign On behavior- in Facebook, use the native SDK, and instructions for setting up SSO. It includes entering your bundle id in the settings and setting up a referring url name (the name of your app usually). So what happens is- if you launch safari mobile, and log into facebook. Then, launch your app, with good integrated SSO. Then, it won't require you to login/pass, because it knows you've authenticated via browser. Same with Android.
I think what you are looking for (at least for Android) is starting an Intent on certain schema that will open Facebook app.
This is answered here Android facebook intent to show profile with class com.facebook.katana.ProfileTabHostActivity doesn't work any more
I had been working on dropbox enabling an application and when the person elected to connect to Dropbox, the authentication process launched an intent within the app, once the window popped I was able to accept the access and the app resumed as usual and everything was great.
Something changed when I turned the code over for implementation such that now when I elect to connect to Dropbox, the app instead launches a webpage for authentication instead of the intent. Also, the "resume" is not called in the application after I authorize the app to dropbox.
I have looked in the usual places but have been unable to determine why this has changed.. Thoughts??
Did you recently pick up an updated version of the Dropbox SDK? There was a recent update which uses an improved authorization flow. If your app is using the new flow, and you don't yet have a version of the Dropbox Android app which supports that flow, then your API app will fall back to using browser-based authorization. This should go away once the Dropbox Android app is updated in Google Play.
The web-auth flow should still return control to your app in the same way as the delegated-auth flow. If you're seeing issues there, you should get in touch with Dropbox support. You can submit a ticket using the "API Support" link on dropbox.com/developers
I'm having some problems with facebook integration on my android app. I've looked at the examples that come with the api and i can do the things shown in those ok. But i'm having problems with other things such as getting single sign on to work properly, authentication across multiple activities in the app and loading a facebook page (non-api call) without being asked to log in again.
Anyone have examples that show these?
When making API calls, you usually need to include the access_token parameter that was issued when the user authenticated. This is how facebook knows who you are when you make requests.
Similarly, when loading facebook pages (not using the API), you have to remember to send the cookies Facebook sent when the user logged in. Normally the browser keeps track of these automatically, but in your program or app you might have to handle them manually.
I don't have experience with Android specifically, and I don't know what you're using to load and render facebook pages, but knowing how facebook is keeping track of logged-in users should give you an idea of where to start. A google search or two should get you on your way.
Go to facebook.java class and change package name com.facebook.katana to com.facebook.katanaaa or any one of your own choice. This worked for me .