简体   繁体   中英

Is the Facebook Push Notifications feature supported by Facebook SDK version 3.23.1?

My goal is to implement the Facebook Push Notifications feature on my app. I am following the Push Campaigns Quickstart guide at https://developers.facebook.com/docs/push-notifications/quickstart . Before starting, I need to add the Facebook SDK to my app. In my build.gradle file, I have the following line:

compile 'com.facebook.android:facebook-android-sdk:3.23.1'

This means that I am using Facebook SDK version 3.23.1. That version was released on Mar 12, 2015. I was wondering if the Facebook Push Notifications feature is supported by Facebook SDK version 3.23.1. Thank you.

I was following the instructions at https://developers.facebook.com/docs/push-notifications/android and the following line was not letting my app to compile:

AppEventsLogger.setPushNotificationsRegistrationId(refreshedToken);

The error was what you can see at Cannot resolve method 'setPushNotificationsRegistrationId(java.lang.String)' for Facebook Push Notifications . In this link you can find the answer that applies to this question too:

The setPushNotificationsRegistrationId() method did not exist in Facebook SDK 3.23.1: https://developers.facebook.com/docs/reference/android/3.23.1/class/AppEventsLogger/ . It was introduced from Facebook SDK 4.11: https://developers.facebook.com/docs/reference/android/4.11/class/AppEventsLogger/ and https://developers.facebook.com/docs/android/change-log-4x .

Conclusion: No, the Facebook Push Notifications feature is not supported by Facebook SDK 3.23.1. It would be required to have at least Facebook SDK 4.11.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM