Search code examples
flutterfacebookdartfacebook-events

Is there a way to log user's basic info in Flutter?


I want to setup Facebook Advanced Matching in Flutter app so - I want to know if there a way to log user's basic info (name, email, phone, DOB, gender etc) with this package?

Package: https://pub.dev/packages/facebook_app_events (Facebook App Events)

In lib/facebook_app_events.dart (link) I see method to clearUserData method to clear user's data but don't see method to set these values.

Reference for setting up advanced matching on native app: https://developers.facebook.com/docs/app-events/advanced-matching#use-the-facebook-sdk

Edit 1: To be clear I already have user's info and want to log it with Facebook.


Solution

  • Thank you for spotting the mistake. You brought to my attention that the setUserData was accidentally removed in version 0.14.1 of the Flutter plugin as the deprecation notes were misread.

    It is added back in upcoming version of the plugin: https://github.com/oddbit/flutter_facebook_app_events/pull/204