Facebook的消息remote_app_id不匹配存储ID [英] Facebook message remote_app_id does not match stored id

查看:347
本文介绍了Facebook的消息remote_app_id不匹配存储ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我认识到这一问题已经被问过,我看过这些帖子并搜查网,并试图例子,但我运行应用程序时仍然得到这个错误:

First off I realize this question has been asked before and I have read those posts and searched the net and tried the examples but still get this error when running my app:

16 09-06:09:47.010:W / fb4a(:):BlueServiceQueue(3237):com.facebook.http.protocol.ApiException:remote_app_id不匹配存储ID

09-06 16:09:47.010: W/fb4a(:):BlueServiceQueue(3237): com.facebook.http.protocol.ApiException: remote_app_id does not match stored id

我可以从Eclipse运行应用程序,它工作得很好。我的问题是,当我将项目导出到一个APK,并通过电子邮件发送给测试人员,他们安装它不起作用。我与我的Play商店的密钥库导出,所以我敢肯定,这事做的hashkey但我只是不明白了这一点,倒很AP preciate任何意见,我可以得到的。

I can run the app from Eclipse and it works just fine. The problem I have is when I export the project to an APK and email it to a tester and they install it does not work. I am exporting it with my Play store keystore so I'm sure this has something to do with the hashkey but I just can't figure this out and would really appreciate any advice I can get.

我已经生成使用相同的密钥库和别名我导出的文件与密钥工具的hashkey:

I have generated the hashkey with the keytool using the same keystore and alias I exported the file as:

keytool.exe的-exportcert -alias android_market -keystore E:\\ Droid的项目\\ keystore_market.keystore | C:\\的Java \\ OpenSSL的\\ BIN \\ OpenSSL的SHA1 -binary | C:\\的Java \\ OpenSSL的\\ BIN \\ OpenSSL的的base64

keytool.exe -exportcert -alias android_market -keystore E:\Droid Projects\keystore_market.keystore | C:\Java\openssl\bin\openssl sha1 -binary | C:\Java\openssl\bin\openssl base64

我读ALLOT帖认为这有时会给错误hashkey所以我也把这个code在我的onCreate生成它在logcat的,也是在屏幕上,然后再出口的apk:

I read ALLOT of posts that said this sometimes gives the wrong hashkey so I also put this code in my onCreate to generate it in the logcat and also on the screen and then exported the apk again:

try {
        PackageInfo info = getPackageManager().getPackageInfo(
                "com.my.package.name", 
                PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            Toast.makeText(NoteFBHome.this, Base64.encodeToString(md.digest(), Base64.DEFAULT), Toast.LENGTH_LONG).show();
            }
    } catch (NameNotFoundException e) {

    } catch (NoSuchAlgorithmException e) {

    }

在有人问我并把我的实际包名称在code :)但是,这给了我相同的密钥。然后我注意到Facebook的开发者控制台说,它可能需要几分钟打所有的服务器,但我已经等了几个小时了,仍然同样的错误。

Before anyone asks I did put my actual package name in the code :) But this gives me the same key. I then noticed that the Facebook developer console said it could take a few minutes to hit all the servers but I have waited several hours now and still same error.

我跟老Facebook的SDK,你可以修改实际的Facebook code,以显示它正在为hashkey但code出现在被改变版本3.0读取。

I read with the old Facebook SDK that you could modify the actual Facebook code to show the hashkey it was looking for but the code appears to be changed in ver 3.0.

我敢肯定有我丢失的东西,但我想我已经看过这这么久,我只是无法看到它。如果任何人有一个为他们工作或其他的想法要弄清楚什么花样,为什么hashkey是错的我就AP preciate它。

I'm sure there is something I am missing but I guess I have looked at this so long I just can't see it. If anyone has any tricks that worked for them or other ideas to figure out why the hashkey is wrong I would appreciate it.

解决方案:

只是想给一个更新,我能解决这个问题,并为有类似问题的人的帮助。该密钥工具使,即使你的字符串是错误的一个hashkey。在我的情况,那是因为我有密钥库文件不正确的路径。最终是什么让我意识到,这是表明我应该与存储密码提示,但我从来没有另一篇文章。因此,对于任何人有这个问题,如果你不提示输入密码,你可能有密钥工具串不正确。希望这有助于。

Just wanted to give an update that I was able to fix this issue and provide any help for anyone with similar problems. The keytool gives a hashkey even if your string is wrong. In my case it was because I had the path of the keystore file incorrect. What finally made me realize this was another post indicating that I should be prompted with the keystore password but I never was. So for anyone else with this issue, if you are not prompted for the password you may have the keytool string incorrect. Hope this helps.

推荐答案

解决方案:

只是想给一个更新,我能解决这个问题,并为有类似问题的人的帮助。该密钥工具使,即使你的字符串是错误的一个hashkey。在我的情况,那是因为我有密钥库文件不正确的路径。最终是什么让我意识到,这是表明我应该与存储密码提示,但我从来没有另一篇文章。因此,对于任何人有这个问题,如果你不提示输入密码,你可能有密钥工具串不正确。希望这有助于。

Just wanted to give an update that I was able to fix this issue and provide any help for anyone with similar problems. The keytool gives a hashkey even if your string is wrong. In my case it was because I had the path of the keystore file incorrect. What finally made me realize this was another post indicating that I should be prompted with the keystore password but I never was. So for anyone else with this issue, if you are not prompted for the password you may have the keytool string incorrect. Hope this helps.

这篇关于Facebook的消息remote_app_id不匹配存储ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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