I have created an app for Android 4.0.
Among them, I would like to authenticate (OAuth) on Facebook.
Available on FacebookSDK
I tried using
LoginButton in GUI components.
If you have a Facebook app on your device,
You will automatically try to authenticate with the Facebook app.
Whether you have a Facebook app or not
I'd like to do the same thing, but if anyone knows how to do it, please let me.
Or please let me know if there is a way to authenticate OAuth without using the official app.
Why do you want it to work the same way whether you have a Facebook app or not?
As @tokoi wrote, if you use WebView to write the code to handle OAuth on the server side and use it via WebView, it may not be impossible to implement it, but in this case, the experience of requesting a username/password again on WebView is concerned.
Also, if you look at Facebook's terms and conditions (https://developers.facebook.com/policy/Japanese/), you can see that at 7.2
Native iOS and Android apps that implement Facebook login must use the official login SDK.
Therefore, I don't think it's a good idea to avoid the flow defined in SDK from a convention perspective.
Previously, to avoid bugs that only occur on certain devices, we have taken such actions... but the source is too different from that time, so I can't give you a direct answer, sorry.
The SDK source code has been disclosed in , so you should be able to do so by removing the operation of the official app (package name com.facebook.katana).
I grep the source code, but I haven't tried it yet.
Wouldn't it be possible to use the
buildFacebookAppList method in to return an empty list (although other operations as well as authentication are likely to be accompanied)?
How about using the official app to log in?
As a procedure, I think it would be good to do the following.
If the Facebook app is not installed, notify the user that the installation is required, transition to the Facebook app page in GooglePlay, and close the app
It's quite tricky and has a low chance of winning, but there's another way I can try it.
I'll write it for your reference just in case:
© 2023 OneMinuteCode. All rights reserved.