Facebook Android SDK 4.2.4 无法登录且 isLogged 使用 Unity 4.3 返回 false [英] Facebook Android SDK 4.2.4 Cant Log in and isLogged returns false with Unity 4.3

查看:18
本文介绍了Facebook Android SDK 4.2.4 无法登录且 isLogged 使用 Unity 4.3 返回 false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用带有 unity4.3 的 facebook sdk v4.2.4 时遇到了问题.我正在 Android 中开发它.

I am facing an issue with the facebook sdk v4.2.4 with unity4.3. I am developing this in Android.

我做了什么:我按照教程中的步骤操作.应用密钥添加正确,keyhash 也从 cmd 控制台正确生成.

What I did : I followed the steps that were told in the tutorial. The app key was added correctly and the keyhash was also correctly generated from the cmd console.

当我点击登录时,出现一个空白屏幕,要求获得权限,我点击是,然后返回主菜单(交互式控制台场景).我看到的是,提交的 isLoggedIn 是 FALSE.我做了很多次,在UNITY4.3上发现了相同的结果.

When I tap log in, A blank screen comes, asks for permissions, I tap on yes and then returns back to the main menu (Interactive console scene). What I see is that the filed isLoggedIn is FALSE. I did it many times and found the same result on UNITY4.3.

在浏览论坛时,我发现 Unity4.3 存在问题,因此我将其降级到 Unity4.2 并测试了 SAME PACKAGE (4.2.4),它对我来说很好用,因为我可以登录并isLoggedIn 返回真.(统一 4.2.x)

On going through the forums I found that there is an issue with Unity4.3, so I downgraded it to Unity4.2 and tested the SAME PACKAGE (4.2.4) and it worked fine with me as i can log in and isLoggedIn returns true. (Unity 4.2.x)

为了让这个插件正常工作,我不得不将它从 4.3.0降级(请注意,我已经在 unity4.3.0,.1,.2,.3 和结果仍然相同)到 4.2.2 以使 Facebook sdk 工作.

As a result to get this PLUGIN WORKING, I had to downgrade it from 4.3.0 (please note that i had tested it in unity4.3.0,.1,.2,.3 and still the same result) to 4.2.2 to get the Facebook sdk working.

真正的问题是什么?我希望插件在 unity4.3.x 中正常工作,而在 unity4.2.x 中不能.有趣的是,在 unity4.3.x 上尝试时没有生成错误日志或警告日志.

The real problem ? I WANT THE PLUGIN to work correctly in unity4.3.x and not in unity4.2.x. The funny part is that there are no error logs or warning logs being generated when trying this on unity4.3.x.

最重要的:在我第一次尝试时,我下载了 Facebook SDK v4.3.6 并尝试进行构建,但我得到了一个

Most Important : During my first attempt, I downloaded the Facebook SDK v4.3.6 and tried making a build BUT I got an

指向 javac.exe 的 Win32 异常

Win32 Exception which pointed at javac.exe

.所以我不得不使用 v4.2.4,因为我发现这个稳定(比升级的好,但对 unity4.3.x 不利).

. So I had to go with v4.2.4 as i found this one stable (better than the upgraded one and bad for unity4.3.x).

因此,如果你们中的任何人(正面临/已经面临)这个问题,请帮助我解决这个问题,并告诉我你们是如何使用最新的 sdk 为 Unity4.3 (Android) 解决这个问题的.任何帮助将不胜感激.

So If any of you guys (are facing/have faced) this issue, help me out of it and let me know how you guys resolved it for Unity4.3 (Android) with the latest sdk. Any help would highly be appreciated.

具体来说,我使用的是 jdk1.7 和 android 工具修订版 r22.请不要建议我降级其中任何一个.

To be specific I'm using jdk1.7 and android tools revision r22. Please don't advise me to downgrade any of them.

提前致谢.

推荐答案

好吧,我要回答自己的问题似乎很奇怪,但我别无选择.

Well It seems oddly strange that I'm about to answer my own question but I have no choice.

无论如何,问题出在我 2 年前第一次安装的 jdk 1.6 上,我删除了它(没有卸载).之后我安装了jdk7.很奇怪吧?

Anyways, The problem was with my jdk 1.6 that I had first installed 2 years ago, which i deleted it(with out uninstalling). And after that i had installed jdk7. Strange, right?

因此,根据新的 sdk,我的机器上似乎安装了 java6,因为其中存储了条目但文件丢失了,因此出现了 android 的构建错误.[请注意,以前的 fd sdk 版本 4.2.x 及以下版本并未遵循此规则或其他任何规则.]

So according to the new sdk it was seeming as if java6 was installed on my machine as it had the entry stored in it but the files were missing, and Hence the build error for android. [Please note that the previous fd sdk versions 4.2.x and below, were not following this rule or whatever.]

所以我得到了 jdk6 缺少的 dll(与它相关的所有更新条目和基本安装条目)并且块数据从我的系统中删除.

So I got the missing dll's for jdk6(All entries of the updates related to it and base installation entry) and the chunk data was removed from my system.

所以这是我的链接跟着.

之后,我将最新的 sdk 与 unity4.3.3 集成在一起,一切正常(尽管我在编辑器上生成 keyhash 时遇到了一些问题,这导致我对 cs 脚本进行了一些编辑).

After that I integrated the newest sdk with with unity4.3.3 and everything worked fine(Though i had some issues with the keyhash generation on the editor, which resulted into me to edit the cs script a bit).

总而言之,它运行良好.我已经修复了包 v 4.3.6 的一个错误.所以如果您有任何疑问或需要包裹,您可以随时向我寻求帮助.

All in all, it works well. I've fixed a bug with the package v 4.3.6. So if you have any queries or if you want the package, You can ask me for the help anytime.

这篇关于Facebook Android SDK 4.2.4 无法登录且 isLogged 使用 Unity 4.3 返回 false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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