Search code examples
androidfacebookandroid-studio-2.0

When adding Facebook SDK " appeventslogger.activateapp(this)" is shown deprecated


Using Facebook SDK 4.5. Tried using SDK 4.5 to 4.11. Problem still facing.

AS per this changelog : https://developers.facebook.com/docs/android/change-log-4.x

Its changed to AppEventsLogger.activateApp(Application)

But I am facing trouble while implementing it.

Screenshot:


Solution

  • Just replace AppEventsLogger.activateApp(this) to

    AppEventsLogger.activateApp(getApplication());