Ashish Ashish - 5 months ago 263
Android Question

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:

Answer

Just replace AppEventsLogger.activateApp(this) to

AppEventsLogger.activateApp(getApplication());

or better wey is to activate AppeventLogger inside Application Class on onCreate method :

AppEventsLogger.activateApp(this);
Comments