问题
Developing a Facebook single-sign-on app, but when testing login without the Facebook app installed, this error occurs in com.facebook.LoginActivity's authorizationClient's onCompleteListener. There's a tiny spinning waiting dialog, then that disappears and when if I set a breakpoint in it's listener, this is the errorMessage there,
Unrecognized 'com.facebook.platform.protocol.PROTOCOL_ACTION' extra: 'com.facebook.platform.action.request.LOGIN_DIALOG'.
This is occurring on my Nexus 5, running 4.4.2, sdk=19.
On a Samsung Galaxy S3 (GT-I9300), running 4.1.2, sdk=19, everything occurs as expected, bringing up a web-view, and allowing you to login, and allow the app without a problem.
FacebookSDKVersion tells me it is,
BUILD = "3.0.0"
MIGRATION_BUNDLE = "fbsdk:20121026"
回答1:
Ok, so it turns out that this happens if you try to login when you don't have the Facebook App installed, but do have the Facebook Messenger app installed.
I was just testing this on my own phone which had both installed, and I only uninstalled the main app, not even thinking about Messenger. But obviously a call, or check goes out to see if some Facebook thing exists, which then leads the app to follow the login flow of having the app installed, but the app isn't installed, Messenger is obviously confirming something that only the main app should.
Bizarro.
来源:https://stackoverflow.com/questions/21675784/facebook-android-sdk-unrecognized-com-facebook-platform-protocol-protocol-act