IdToken: googleAuth.idToken, accessToken: googleAuth. GoogleSignInAuthentication googleAuth = await thentication Īwait ( GoogleSignInAccount googleUser = await _googleSignIn.signIn() Simply add the Google_SignIn Package from and add the following code to your custom Flutter button. When you sign up for a new account via the Facebook mobile site, you are asked to provide your phone number instead of your. final _facebookConnect = new FacebookConnect( When you visit Facebook from a mobile phone Web browser, the site redirects you to the mobile-friendly Facebook site, which has a layout that's easier to use in a small phone browser than the traditional Facebook website. It requires the following webView package that redirects to Facebook's SignIn Page Īnd a custom button can be implemented like so. The initial Facebook Connect Login Package can be found And credits go to the package creator roughikeįor google signin use google_sign_in, this package is actually quite mature and easier to get going.Īs of Dec 2017, there is a Facebook Login Solution and also 1 for Facebook Login with Firebase to create a Facebook FirebaseUser. Hope it helps others who are having troubles with facebook login. So no excuse to use Firebase or having to interface yourself!
In this article we will show you how to login and signup on Facebook. Facebook also is the king of social networking sites for a reason.
This is the way to go right now since the package actually uses native Facebook Login SDKs on Android and iOS. is an American multinational technology company based in Menlo Park, California. You should see the login screen when clicking bottom right button, and check the printed response on your debug console: final result = await facebookLogin.logInWithReadPermissions() -> Versions bellow 3.0Ĭase FacebookLoginStatus.cancelledByUser:įloatingActionButton: new FloatingActionButton( Import 'package:flutter_facebook_login/flutter_facebook_login.dart' Ĭlass MyApp extends StatelessWidget build(BuildContext context) ) : super(key: key) įinal String createState() => new _MyHomePageState() įinal facebookLogin = new FacebookLogin() įinal result = await facebookLogin.logIn() Just keep in mind you must have followed all configuration as described in the repository and must have a facebook app configured: import 'package:flutter/material.dart' Here is a functioning main.dart example that should work.
Adding this late answer since now there is a package, flutter_facebook_login that replaces flutter_facebook_connect.