I want to develop the android app with facebook authentication. But if the phone has facebook application in it, I cannot auth on my app, if not, it works well.
so, i want to force a facebook authentication by mobile web without facebook application.
Only if I use authorize(. , .)in application, it uses facebook app directly.
How can I fix this problem??
additionally, Hackbook(https://developers.facebook.com/docs/mobile/android/hackbook/) also doesn't work if I auth by facebook app. I cannot login on app.
/////comment
I found the answer by myself
Change the authorize function in facebook.java in facebook sdk.
public void authorize(Activity activity, final DialogListener listener) {
authorize(activity, new String[] {}, FORCE_DIALOG_AUTH,
listener);
}
/**
* Authorize method that grants custom permissions.
*
* See authorize() below for @params.
*/
public void authorize(Activity activity, String[] permissions,
final DialogListener listener) {
authorize(activity, permissions, FORCE_DIALOG_AUTH, listener);
}
now it works!
When you use Facebook SDK 3.0 and the login button the best way to force this is setting a LoginBehavior to the LoginButton. This can be done like this:
Source: Android - Force Facebook connexion - Stack Overflow