android - Can not access Facebook session - UnknownError: Invalid application -
i'm using prime31 socialnetworking plugin unity3d facebook sdk 3.5 , trying login facebook on android 2.3.5 device. facebook application installed on device , facebook user logged in prior application launch. default login behaviour sso_with_fallback
used.
when initiate login application observe following behaviour:
- when application starts facebook session in
created
state. - a permissions dialog prompts me allow basic read access application.
- i click ok , main application activity shown instead of facebook's login dialog (maybe it's intentional
session.getactivesession().closeandcleartokeninformation()
,session.setactivesession(null)
called priornew session.openrequest(facebookplugin.getactivity())
inside prime31 plugin). - my application's facebook session not opened (is in
closed_login_failed
state).
the logcat reports me these lines (package name , facebook app id replaced):
i/prime31 ( 5077): facebookplugin: openactivesession.call state: closed_login_failed, exception: com.facebook.facebookexception: log in attempt aborted. i/prime31 ( 5077): session state: opening i/activitymanager( 1444): starting activity: intent { act=sso_with_fallback cmp=my_package_name/com.facebook.loginactivity (has extras) } pid 5077 i/prime31 ( 5077): facebookplugin: openactivesession.call state: opening, exception: null v/activitymanager( 1444): checking restart com.facebook.loginactivity: changed=0x0, handles=0x0 v/activitymanager( 1444): oldconfig={ scale=1.0 imsi=250/2 loc=ru_ru touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uimode=17 seq=3 skin=default fontsize=3} v/activitymanager( 1444): newconfig={ scale=1.0 imsi=250/2 loc=ru_ru touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uimode=17 seq=3 skin=default fontsize=3} v/windowmanager( 1444): finished animation in appwindowtoken{40e61148 token=historyrecord{408389c8 my_package_name/com.prime31.unityplayernativeactivity}} @ 6621760 i/activitymanager( 1444): displayed my_package_name/com.facebook.loginactivity: +547ms v/windowmanager( 1444): finished animation in appwindowtoken{40c836a8 token=historyrecord{40d3d640 my_package_name/com.facebook.loginactivity}} @ 6621760 d/nativecrypto( 3576): returned sslselect() result 1, error code 2 w/fb4a(:<default>):blueservicequeue( 3576): exception during service w/fb4a(:<default>):blueservicequeue( 3576): com.facebook.http.protocol.apiexception: invalid application my_valid_app_id w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.http.protocol.apiresponsechecker.b(apiresponsechecker.java:81) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.http.protocol.apiresponsechecker.a(apiresponsechecker.java:110) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.http.protocol.apiresponse.h(apiresponse.java:291) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.katana.server.protocol.authorizeappmethod.a(authorizeappmethod.java:272) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.katana.server.protocol.authorizeappmethod.a(authorizeappmethod.java:29) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.http.protocol.singlemethodrunnerimpl.a(singlemethodrunnerimpl.java:152) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.http.protocol.abstractsinglemethodrunner.a(abstractsinglemethodrunner.java:16) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.katana.server.handler.platformoperationhandler.c(platformoperationhandler.java:366) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.katana.server.handler.platformoperationhandler.a(platformoperationhandler.java:259) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.fbservice.service.blueservicequeue.d(blueservicequeue.java:293) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.fbservice.service.blueservicequeue.d(blueservicequeue.java:53) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.fbservice.service.blueservicequeue$3.run(blueservicequeue.java:230) w/fb4a(:<default>):blueservicequeue( 3576): @ java.util.concurrent.executors$runnableadapter.call(executors.java:444) w/fb4a(:<default>):blueservicequeue( 3576): @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:306) w/fb4a(:<default>):blueservicequeue( 3576): @ java.util.concurrent.futuretask.run(futuretask.java:138) w/fb4a(:<default>):blueservicequeue( 3576): @ com.facebook.common.executors.handlerexecutorserviceimpl$listenablescheduledfuture.run(handlerexecutorserviceimpl.java:268) w/fb4a(:<default>):blueservicequeue( 3576): @ android.os.handler.handlecallback(handler.java:587) w/fb4a(:<default>):blueservicequeue( 3576): @ android.os.handler.dispatchmessage(handler.java:92) w/fb4a(:<default>):blueservicequeue( 3576): @ android.os.looper.loop(looper.java:150) w/fb4a(:<default>):blueservicequeue( 3576): @ android.os.handlerthread.run(handlerthread.java:60) w/bundle ( 5077): key com.facebook.platform.protocol.protocol_version expected string value java.lang.integer. default value <null> returned. w/bundle ( 5077): attempt cast generated internal exception: w/bundle ( 5077): java.lang.classcastexception: java.lang.integer w/bundle ( 5077): @ android.os.bundle.getstring(bundle.java:1040) w/bundle ( 5077): @ android.content.intent.getstringextra(intent.java:3685) w/bundle ( 5077): @ com.facebook.authorizationclient$katanalogindialogauthhandler.tryauthorize(authorizationclient.java:821) w/bundle ( 5077): @ com.facebook.authorizationclient.trycurrenthandler(authorizationclient.java:272) w/bundle ( 5077): @ com.facebook.authorizationclient.trynexthandler(authorizationclient.java:238) w/bundle ( 5077): @ com.facebook.authorizationclient$gettokenauthhandler.gettokencompleted(authorizationclient.java:772) w/bundle ( 5077): @ com.facebook.authorizationclient$gettokenauthhandler$1.completed(authorizationclient.java:731) w/bundle ( 5077): @ com.facebook.internal.platformserviceclient.callback(platformserviceclient.java:144) w/bundle ( 5077): @ com.facebook.internal.platformserviceclient.handlemessage(platformserviceclient.java:128) w/bundle ( 5077): @ com.facebook.internal.platformserviceclient$1.handlemessage(platformserviceclient.java:54) w/bundle ( 5077): @ android.os.handler.dispatchmessage(handler.java:99) w/bundle ( 5077): @ android.os.looper.loop(looper.java:150) w/bundle ( 5077): @ android.app.activitythread.main(activitythread.java:4385) w/bundle ( 5077): @ java.lang.reflect.method.invokenative(native method) w/bundle ( 5077): @ java.lang.reflect.method.invoke(method.java:507) w/bundle ( 5077): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:849) w/bundle ( 5077): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:607) w/bundle ( 5077): @ dalvik.system.nativestart.main(native method)
when logout facebook within native app behaviour changes - login screen appears, when main application activity shown same closed_login_failed
session state.
i've checked application id , hash key in facebook app settings: both matching app's settings. hash key logcatted prime31 plugin same created on windows evironment. when changed app id different got error - "invalid app id". app id seems set correctly. else might miss?
for encounter similar issues check facebook application sandbox mode , active facebook user when starting application. in case starting application in sandbox mode , current facebook user not granted list of users in facebook application settings.
Comments
Post a Comment