flutter_facebook_auth 4.3.3 flutter_facebook_auth: ^4.3.3 copied to clipboard
The easiest way to add facebook login to your flutter app, get user information, profile picture and more. Web support included.
import 'dart:convert';
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'my_app.dart';
void main() async {
if (kIsWeb) {
// initialiaze the facebook javascript SDK
await FacebookAuth.instance.webInitialize(
appId: "1329834907365798",
cookie: true,
xfbml: true,
version: "v13.0",
);
}
runApp(MyApp());
}
String prettyPrint(Map json) {
JsonEncoder encoder = new JsonEncoder.withIndent(' ');
String pretty = encoder.convert(json);
return pretty;
}