Facebook friendlist/app-sharing

What is currently the best way implement facebook(friendlist,sharing,…) into apps?
If someone has done that for android or html5 i would love to hear from you!

I am trying to use extension-facebook.
But it ends in a java error, saying i should use 1.7 instead of 1.6.
Q:Where can i tell gradle?! to use 1.7 instead of 1.6?

LoginManager.java:356: error: diamond operator is not supported in -source 1.6
        this.pendingLoggingExtras = new HashMap<>();
  (use -source 7 or higher to enable diamond operator)
26 errors
:deps:facebook-sdk:compileReleaseJavaWithJavac FAILED

I was trying untyped __js__(...) which worked in Chrome but bugged in Firefox.
Q: Still, i was wondering, if i make a call with js and get a string as a reply,
How can i access that string from haxe at runtime? Or am i stuck in a js-bubble?!
Q2: Are there better ways do it for html5?

Android: extension-facebook is working!
HTML5: untyped js works impressively good!

Is Java 7 installed?

In HTML5, a string is a string. You shouldn’t have to do much work if you get a string, but you may need to type it:

var value:String = untyped __js__("someJSCall ()");

You can also use extern classes

java -version:
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.10.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

javac -version:
javac 1.8.0_131

Thats awesome!
Sometimes the solution is just too obvious :wink:

Use lime config, do you have a custom Java JDK path set? If so, edit your ~/.lime/config.xml file and try setting it to Java 7 or 8, or, maybe there’s something in the Gradle JSON we generate for your app that needs to be changed (the source files are found in “lime/templates/android/template”)

I dont have a custom JDK path.
Its odd, it looks like i am using java 1.8 but even a fresh “openfl create …” gets build with 1.6.

I tried set the version by hand in build.gradle:

allprojects {
    tasks.withType(JavaCompile) { 
    sourceCompatibility = "1.1" //without quote or 1.7 or 1.8 doesnt make a difference
    targetCompatibility = "1.1" 

But all those changes dont help :frowning:

Is there an “official” way to set/force the sourceCompatibility/targetCompatibility?!

Did you set this in the Lime build.gradle file, or in your generated build.gradle file?