5

When i try to Launch AppInviteContent like below :

 AppInviteContent content = new AppInviteContent.Builder()
            .setApplinkUrl("....")
            .setPreviewImageUrl("https://amazingslider.com/wp-content/uploads/2012/12/dandelion.jpg")
            .build();
AppInviteDialog.show(activity, content);

i receive the error The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first:

04-09 02:46:50.429: W/System.err(5960): The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
04-09 02:46:50.429: W/System.err(5960):     at com.facebook.internal.Validate.sdkInitialized(Validate.java:145)
04-09 02:46:50.429: W/System.err(5960):     at com.facebook.FacebookSdk.getCallbackRequestCodeOffset(FacebookSdk.java:896)
04-09 02:46:50.429: W/System.err(5960):     at com.facebook.internal.CallbackManagerImpl$RequestCodeOffset.toRequestCode(CallbackManagerImpl.java:110)
04-09 02:46:50.429: W/System.err(5960):     at com.facebook.share.widget.AppInviteDialog.<clinit>(AppInviteDialog.java:75)

but i don't understand because FacebookSdk.sdkInitialize (Context) is deprecated now :( why i receive this error ?

i m under Delphi if it's matter

1 Answers1

3

Just use the deprecated FacebookSdk.sdkInitialize(); for now.

Auto-init uses content providers which fail on some devices with modified Android. I got thousands of crashes and uninstalls from my users.

I reported this issue months ago and they still didn't fix it, instead they just closed the issue.

Minas
  • 1,422
  • 16
  • 29