本文介绍了Facebook的Andr​​oid SDK中,"无法识别'com.facebook.platform.protocol.PROTOCOL_ACTION“还有:”com.facebook.platform.action.request.LOGIN_DIALOG'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发Facebook的单点登录应用程序,但没有安装Facebook应用程序测试登录的时候,在com.facebook.LoginActivity的authorizationClient的onCompleteListener出现此错误。有一个微小的旋转等待对话框,然后会消失,当如果我设置一个断点在它的听众,这是的errorMessage那里,

 无法识别'com.facebook.platform.protocol.PROTOCOL_ACTION还有:com.facebook.platform.action.request.LOGIN_DIALOG。

这是发生在我的Nexus 5,运行4.4.2,SDK = 19。

在一个三星Galaxy S3(GT-I9300),运行4.1.2 SDK = 19,发生的一切如预期,造就了网络视图,并允许您登录,并允许应用没有问题。

FacebookSDKVersion告诉我它是,

  BUILD =3.0.0
MIGRATION_BUNDLE =fbsdk:20121026


解决方案

好了,事实证明,这种情况下,如果你尝试登录时你的的安装Facebook应用程序,但的的安装Facebook的Messenger应用。

我刚刚测试此我自己的手机,它已经都安装,我只卸载了主要的应用程序,甚至没有思考的使者。但显然一个电话,或支票出去看看,如果一些Facebook的东西存在,然后导致应用程序遵循已经安装了该应用程序的登录流程,但未安装应用程序,斜挎显然是确认的东西,只有主应用程序应该的。

比扎罗。

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"
解决方案

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.

这篇关于Facebook的Andr​​oid SDK中,"无法识别'com.facebook.platform.protocol.PROTOCOL_ACTION“还有:”com.facebook.platform.action.request.LOGIN_DIALOG'"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 14:04