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

1

1

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.

Cockaigne answered 21/1, 2014 at 7:14 Comment(1)
Tip on this which may help in some situations: #19999180Degroot
C
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.

Cockaigne answered 21/1, 2014 at 18:19 Comment(2)
What modifications did you make to v4.3.6 to make it work? If it's applicable, I would like that fix to go into a future version so others won't have to go through the same manual steps you did.Riggs
@BrianJew I added this at Line 62 in FacebookAndroidUtil.CS--- System.Environment.GetEnvironmentVariable("HOMEDRIVE")Cockaigne

© 2022 - 2024 — McMap. All rights reserved.