Open facebook login screen in personal App and not in device browser

╄→гoц情女王★ 提交于 2019-12-05 21:46:57

You have to do this in your code it will work for you.

LoginManager.getInstance().setLoginBehavior(LoginBehavior.WEB_VIEW_ONLY); OR facebookLoginButton.setLoginBehavior(LoginBehavior.WEB_VIEW_ONLY);

For more info please see below link

https://developers.facebook.com/docs/reference/android/current/class/LoginBehavior/

For FaceBook add this tag to your Manifest.XML file

<activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>

and get fb_login_protocol_scheme value from the app dashboard in facebook developers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!