Hi everyone, I need some advice here.
The current Facebook SDK for Unity 6.2.2 (Downloads - Unity SDK - Documentation - Meta for Developers, neither the beta) doesn’t include support for App Invites: https://developers.facebook.com/docs/app-invites.
I’m trying to add the functionality on my own. I’ve started by creating an Android plugin using the Facebook Android SDK, and also just the App Invite functionality, a simple static method including the following:
public static void inviteContacts(Activity root, String linkURL, String previewImageURL) {
Log.i(TAG, "MainActivity::inviteContacts()");
Log.i(TAG, "MainActivity::FacebookId:" + FacebookSdk.getApplicationId()); //The code fails just here!
if (AppInviteDialog.canShow()) {
Log.i(TAG, "AppInviteDialog.canShow()!");
AppInviteContent content = new AppInviteContent.Builder()
.setApplinkUrl(linkURL)
.setPreviewImageUrl(previewImageURL)
.build();
//AppInviteDialog.show(this, content);
AppInviteDialog.show(root, content);
}
}
But unfortunately I’m getting the following error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookSdk [OR ANY OTHER FACEBOOK JAVA CLASS]
I’m following the instructions here, and the example worked as expected: Loading...
Am I missing something?
Thanks in advance.