0

I am trying to follow the instructions at https://developers.facebook.com/docs/app-events/android#legacy-activation in the section "Legacy SDK Initialization". They say that "in the Facebook SDK for Android v4.18, and earlier, the SDK must be initialized". I am using Facebook SDK v3.23.1. They provide a code to demonstrate how to initialize the SDK. The problem that I am experiencing is that as part of the sample code, they use the following two lines:

import com.facebook.FacebookSdk;
FacebookSdk.sdkInitialize(getApplicationContext());

When I try to do that, I get the following error:

Cannot resolve symbol 'FacebookSdk'

By testing, I realized that import com.facebook.FacebookSdk can only be used from Facebook SDK 4.0.0 and higher, but I am using Facebook SDK 3.23.1. Is there an alternative way to initialize Facebook SDK for SDK v3.23.1?

Jaime Montoya
  • 6,915
  • 14
  • 67
  • 103
  • I am reading the documentation at https://developers.facebook.com/docs/reference/android/current/class/FacebookSdk/, but I do not see information about the Facebook SDK versions that support the FacebookSdk class. I guess Facebook SDK 3.23.1 does not support it, but is there an equivalent function? Otherwise, how am I supposed to initialize Facebook SDK in order to implement App Events using SDK version 3.23.1? – Jaime Montoya Feb 28 '17 at 18:36
  • Confirmed. The FacebookSdk class does not even exist in Facebook SDK 3.23.1: https://developers.facebook.com/docs/reference/android/3.23/. How am I supposed to initialize the SDK and implement App Events for Android in this case? – Jaime Montoya Feb 28 '17 at 18:46
  • No need to initialize it. – Jaime Montoya Mar 01 '17 at 01:34

1 Answers1

0

The solution was using the AppEventsLogger class by following the instructions at https://developers.facebook.com/docs/reference/android/3.23.1/class/AppEventsLogger/. I did not have to initialize Facebook SDK v3.23.1, and I guess it is not even possible to initialize it because they do not provide a method to do that in the SDK 3.23.1 release.

Jaime Montoya
  • 6,915
  • 14
  • 67
  • 103