Facebook SDK Android exporting issue

Hello, this is my first post here to bear with me.
I’m using unity 4.6, Facebook SDK 6.2.2, jdk 1.7 (I have 1.8 as well), and using the most recent android SDK.

The facebook sharing I’m implementing into my game works in the editor, but I’m getting issues when I export. Currently I’m trying android only, so I’m not sure about iOS or web. (The game will be released to these 3 platforms eventually) When I export onto android, I’ve messed around quite a bit with it so far, but keep getting different errors.

Some of the errors I’ve gotten:

Failed to compile resources with the following parameters:
-bootclasspath “C:/Users/mschuessler/Documents/sdk/platforms/android-22\android.jar” -d “C:\Users\mschuessler\Documents\Unity\2DPlatformer\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\facebook\android\R.java” “com\UNO\platformer_2D\R.java”
warning: java\lang\Object.class(java\lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.

Error building Player: UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.

And also another build error that I don’t have in front of me currently.

The game exports correctly onto android without the Facebook SDK, so it’s not that.
I’ve also tried switching over to jdk 1.6. (Yes I changed the JDK HOME). It seems to want to use jdk 1.6, but then tells me I need to upgrade when I try that. I’ve been looking for answers for quite sometime but it just doesn’t seem to want to work.

Thanks in advance!

Edit: I also have it all set up as an android app and what not on Facebook’s developer site.

–Answering my own question–

I managed to solve all of my build errors by updating unity. I was on 4.6.0 and updated to 4.6.7. Doing this allowed me to specify my JDK location. (As I have 3 different JDK versions installed on my computer) I chose the location of JDK 1.8. The build to android worked perfectly.