flutter_facebook_auth 5.0.11 copy "flutter_facebook_auth: ^5.0.11" to clipboard
flutter_facebook_auth: ^5.0.11 copied to clipboard

outdated

The easiest way to add facebook login to your flutter app. Feature includes getting user information, profile picture and more. This plugin also supports Web and macOS.

example/lib/main.dart

import 'dart:convert';
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb;
import 'package:flutter/material.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'my_app.dart';

void main() async {
  if (kIsWeb || defaultTargetPlatform == TargetPlatform.macOS) {
    // initialiaze the facebook javascript SDK
    await FacebookAuth.instance.webAndDesktopInitialize(
      appId: "1329834907365798",
      cookie: true,
      xfbml: true,
      version: "v15.0",
    );
  }
  runApp(MyApp());
}

String prettyPrint(Map json) {
  JsonEncoder encoder = new JsonEncoder.withIndent('  ');
  String pretty = encoder.convert(json);
  return pretty;
}
1.4k
likes
150
points
137k
downloads

Publisher

verified publishermeedu.app

Weekly Downloads

The easiest way to add facebook login to your flutter app. Feature includes getting user information, profile picture and more. This plugin also supports Web and macOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

facebook_auth_desktop, flutter, flutter_facebook_auth_platform_interface, flutter_facebook_auth_web

More

Packages that depend on flutter_facebook_auth