Android Question Facebook Auth loginManager

Pendrush

Well-Known Member
Licensed User
Longtime User
How can i change loginBehavior with JavaObject?
I need to set some parameters to false, actually I need only allowWebViewAuth to be true.

 

Pendrush

Well-Known Member
Licensed User
Longtime User
After few hours of trying... every run finish with this error:
java.lang.RuntimeException: Method: removeLoggingBehavior not found in: anywheresoftware.b4x.objects.FacebookSdkWrapper
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
After a lot of trouble with JavaObject, finally make it to work in few minutes with Reflection lib:
B4X:
Dim r As Reflector
r.Target = facebook
Dim rx As Reflector
rx.Target = r.GetField("loginManager")
Log(rx.GetField("loginBehavior"))
rx.SetField("loginBehavior", "WEB_VIEW_ONLY", "com.facebook.login.LoginBehavior")
Log(rx.GetField("loginBehavior"))
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…