无法通过“X-FACEBOOK-PLATFORM”连接到 Facebook 聊天使用加密的访问令牌
到目前为止,我一直在使用旧的聊天登录机制来登录 Facebook 聊天(带有“sig”参数的机制)。
现在,在对它的支持消失之后,我更改了与新身份验证系统相对应的代码(即没有 sig 参数)。
我正在创建这种字符串,在挑战阶段后将其作为“响应”标签发送。
api_key=<apikey>&call_id=<callid>&method=<method from challenge>&nonce=<nonce from challenge>&access_token=<access token>&v=1.0
我得到以下信息:
以下情况仅发生在 iOS 上。 Android 工作正常(这告诉我的代码是正确的)。 这些版本之间的区别在于,在 iOS 上我获得加密的访问令牌,而在 Android 上我获得旧的访问令牌。
IE 在 Android 上 213458xx1425|1.BGgrgnfWrdpG_X18.3600.1213xxx135.2-1334679|dHcDbxGbeYxxxxx 在 iOS 上 AAAByQT1Vjdkxxxxxxxxxx
另外, 我尝试进入应用程序控制面板并禁用加密访问令牌选项,但没有任何效果。
我正在使用 Titanium 的最后一个 SDK,1.7.4 (v2011-10-21 18:18:15)
任何人都可以让我了解这个问题吗?我看到其他人也有类似的问题,但没有解决方案。 集成 Facebook 聊天
感谢您的帮助, 内塔内尔。
Till now I've been using the old chat log on mechanism to login facebook chat (the one with the "sig" parameter).
Now after the support for it is gone, I changed my code corresponding to the new authentication system (i.e. without the sig parameter).
I am creating this kind of string which I send as a "response" tag after the challenge phase.
api_key=<apikey>&call_id=<callid>&method=<method from challenge>&nonce=<nonce from challenge>&access_token=<access token>&v=1.0
And I get the following:
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
The following occurs just on iOS. Android works fine (which tell my code is correct).
The difference between those versions is that on iOS I get encrypted access token, and on Android I get the old access token.
i.e.
on Android 213458xx1425|1.BGgrgnfWrdpG_X18.3600.1213xxx135.2-1334679|dHcDbxGbeYxxxxx
on iOS AAAByQT1Vjdkxxxxxxxxxxx
Also,
I tried to get into the app control panel and disabled the encrypted access token option but it didn't had any effect.
I am using Titanium's last SDK, 1.7.4 (v2011-10-21 18:18:15)
Anyone can put me some light on this issue? I saw other people with similar problem with no solution.
Integrating Facebook chat
Thanks for advance,
Netanel.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能应该编辑原始问题以包含错误消息,而不是将其添加为注释,但不幸的是,该错误的描述性不够 - 这是您在身份验证流程中可能做错的大多数事情的错误
两个想法:
通过调用 `/me/permissions 检查您使用的访问令牌是否确实具有 xmpp 权限(也许使用https://developers.facebook.com/tools/explorer
如果可能,请跟踪您正在调用的确切 URL,以确保正确填充所有必要的参数
You should probably edit the original question to include the error message instead of adding it as a comment, but that error's not descriptive enough unfortunately - that's the error for most things that you could have done wrong in the auth flow
Two thoughts:
Check if the access token you're using definitely has the xmpp permissions with a call to `/me/permissions (maybe use the Graph API Explorer at https://developers.facebook.com/tools/explorer
If possible, trace through the exact URL you're calling to make sure all the necessary parameters are populated correctly