Facebook的SSO例如不工作 - "时出错。请稍后&QUOT再试一次; [英] Facebook SSO example not working - "An error ocurred. Please try again later"

查看:293
本文介绍了Facebook的SSO例如不工作 - "时出错。请稍后&QUOT再试一次;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给Facebook融入我的应用程序等等都跟着教程在: Facebook的Andr​​oid版,但我不能得到的第一个例子(单点登录)的工作。当我的应用程序加载了,我得到了Facebook的对话框,但它只是说:发生错误,请稍后再试。有一个Facebook式的确定按钮,在底部并没有什么在logcat的:

I'm trying to integrate facebook into my app and so have followed the tutorial at: Facebook Android but I can't get the first example (Single Sign-On) to work. When my app loads up I get the facebook dialog but it just says "An error occurred. Please try again later." with a facebook-style "Ok" button at the bottom and there is nothing in logcat:

我也跟着教程的步骤,但我猜有什么不对的应用程序ID或密钥工具生成的hashkey。下面是我遵循的步骤:

I followed the steps in the tutorial but I'm guessing there is something wrong with the APP ID or the hashkey generated by keytool. Here are the steps I followed:

  1. 在克隆FB的git。
  2. 创建fbSDK项目。
  3. 创建自己的FB项目和链接fbSDK作为一个库。
  4. 在我那么做了密钥工具CMD与OpenSSL和输入密码机器人作为计算器建议的人。
  5. 我去developers.facebook.com并创建了一个新的应用程序。
  6. 在编辑设置 - >移动和设备我把在提供的框中我的哈希值。
  7. 在编辑设置 - >移动和设备我选择本机应用程序的应用型
  8. 早在我的应用程序复制和粘贴的SSO例如code。
  9. 我改变了Facebook上的YOUR_APP_ID()函数的应用程序ID为我的新的应用程序显示的developers.facebokk.com页面上。
  10. 在我跑的应用程序,在我的手机上。
  1. clone fb git.
  2. create fbSDK project.
  3. create own fb project and link the fbSDK as a library.
  4. I then did the keytool cmd with openssl and input the password "android" as suggested by others on stackoverflow.
  5. I went to developers.facebook.com and created a new app.
  6. In "Edit Settings->Mobile and Devices" I put my hash in the box provided.
  7. In "Edit Settings->Mobile and Devices" I chose "Native App" as "Application Type"
  8. Back in the app I copy and pasted the SSO example code.
  9. I changed the "YOUR_APP_ID" in the Facebook() constructor to the APP ID shown on the developers.facebokk.com page for my new app.
  10. I ran the app on my phone.

我不知道为什么会出现没有在logcat中,但是当我安装它,控制台总是,没有失败,说: ActivityManager:警告:活动尚未开始,目前的任务已经带来了到前面

I don't know why there is nothing in logcat but when I install it, the Console always, without fail, says the:ActivityManager: Warning: Activity not started, its current task has been brought to the front

和我找不到任何的logcat提及我的应用程序或我是从Facebook的SDK这是得到的错误: Facebook的-ProxyAuth(4828):无法读取调用封装的签名

And I can't find any logcat reference to my app or the error I was getting from the facebook sdk which was: Facebook-ProxyAuth(4828): Failed to read calling package's signature.

我已经在这几个小时,现在任何帮助将不胜AP preciated。我不能相信Facebook的SDK和帮助是如此粗略为Android,Facebook的应该是自己感到羞愧。

I have been at this for a few hours now and any help would be greatly appreciated. I can't believe the facebook SDK and help is so sketchy for Android, facebook should be ashamed of themselves.

谢谢

InfinitiFizz

InfinitiFizz

推荐答案

其实我也遇到同样的问题,准确,它解决了。 因此,在哈希密钥生成使用以下步骤:

In fact I have encountered the same problem exactly and it solved. So, in the hash key generation use the following steps:

  1. 开启cmd,然后去你的Andr​​oid SDK的路径。
  2. 键入以下命令: 密钥工具-exportcert -alias androiddebugkey -keystore [你的SDK路径|例如C:\用户\用户] .android \ debug.keystore | OpenSSL的SHA1 -binary | OpenSSL的BASE64
  3. 在它的PROMET密码输入机器人
  4. 的结果复制到你的Facebook应用程序设置,并保存设置。
  5. 在你的Andr​​oid应用程序使用Facebook应用程序ID(而不是Android的哈希键)。
  1. open cmd and go to your android SDK path.
  2. type this command : keytool -exportcert -alias androiddebugkey -keystore [your SDK path | e.g c:\users\user].android\debug.keystore | openssl sha1 -binary | openssl base64
  3. after that it's promet for password enter "android"
  4. copy the result to your facebook app settings and save settings.
  5. in your android app use the facebook app id(not the android hash key).

这篇关于Facebook的SSO例如不工作 - "时出错。请稍后&QUOT再试一次;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆