Facebook Android SDK 4.2.4 Cant Log in and isLogged returns false with Unity 4.3

人盡茶涼 提交于 2019-12-29 07:18:51

问题


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

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.

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.

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)

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.

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.

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

Win32 Exception which pointed at javac.exe

. 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).

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.

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

Thanks in Advance.


回答1:


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

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?

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.]

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.

So here's the link which I followed.

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).

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.



来源:https://stackoverflow.com/questions/21251565/facebook-android-sdk-4-2-4-cant-log-in-and-islogged-returns-false-with-unity-4-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!