freshplanet / ANE-Facebook

Air Native Extension (iOS and Android) for the Facebook mobile SDK
Apache License 2.0
221 stars 123 forks source link

ShareDialog not working on Android and canPresentShareDialog returning false with FB App installed #210

Closed fraylopez closed 7 years ago

fraylopez commented 9 years ago

Hi there!

Finally!! we've been able to use shareLinkDialog natively from the Facebook App! It seems that somewere in the code the reference to fb applicationId is missing preventing the ANE to launch the dialog.

Since the code tries to scan the application.xml for the app_id if not found, adding the <meta-data> tag with the app_id as value solves the issue.

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ YOUR_FB_APP_ID"/>

Be aware of the \ app_id( backslash + space + app_id) to cast app_id as String

Hope to help someone!