flutter_facebook_auth 5.0.0-dev.1 copy "flutter_facebook_auth: ^5.0.0-dev.1" to clipboard
flutter_facebook_auth: ^5.0.0-dev.1 copied to clipboard

The easiest way to add facebook login to your flutter app, get user information, profile picture and more. Web support included.

image

pub version last commit license stars

Features #

  • Login on iOS, Android and Web.
  • Express login on Android.
  • Granted and declined permissions.
  • User information, picture profile and more.
  • Provide an access token to make request to the Graph API.

Full documentation 👉 https://facebook.meedu.app

✅ Don't forget to leave your like if this plugin was useful for you.

IMPORTANT: When you install this plugin you need to configure the plugin on Android before run the project again . If you don't do it you will have a No implementation found error because the facebook SDK on Android throws an Exception when the configuration is not defined yet and this locks the other plugins in your project. If you don't need the plugin yet please remove or comment it.


macOS support #

in your macos/runner/info.plist folder you must add

<key>com.apple.security.network.server</key>
<true/>

Now in xcode select the Runner target and go to Signing & Capabilities and enable Outgoing Connections

Captura de Pantalla 2022-05-08 a la(s) 17 17 23

Unlinke ios, android and web for desktop app the facebook session data is not stored by default. In that case this plugin uses flutter_secure_storage to secure store the session data.

To use flutter_secure_storage on macOS you need to add the Keychain Sharing capability

image

Finally in your main.dart you need to initialize this plugin to be available for macOS

import 'package:flutter/foundation.dart' show defaultTargetPlatform;

void main() async {
  if (defaultTargetPlatform == TargetPlatform.macOS) {
    await FacebookAuth.i.webAndDesktopInitialize(
      appId: "1329834907365798",
      cookie: true,
      xfbml: true,
      version: "v13.0",
    );
  }
  runApp(MyApp());
}

If your app also support web you must use the next code instead of above code

import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb;

void main() async {
  if (kIsWeb || defaultTargetPlatform == TargetPlatform.macOS) {
    await FacebookAuth.i.webAndDesktopInitialize(
      appId: "1329834907365798",
      cookie: true,
      xfbml: true,
      version: "v13.0",
    );
  }
  runApp(MyApp());
}
1242
likes
0
pub points
99%
popularity

Publisher

verified publishermeedu.app

The easiest way to add facebook login to your flutter app, get user information, profile picture and more. Web support included.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

facebook_auth_desktop, flutter, flutter_facebook_auth_platform_interface, flutter_facebook_auth_web

More

Packages that depend on flutter_facebook_auth