Facebook Sign in Flutter


Nowadays in most of the mobile app, it required login. And to log in, we need to signup first, filling the long-form. But we can log in to the app through a Social account, then we don’t need to fill a long form to register into the app. Facebook Sign in Flutter is one of the ways to log in.

Our Flutter app development company also provides various Social Login compatibility for mobile apps.

In today’s blog, we will see how we can implement Facebook Sign in Flutter.

Android Integration:

Step1: Open Facebook Developer, login with your facebook credentials and Create an App.

Step2: You will get an AppID, save it with you.

Step3: Now, copy-paste the following to your strings resource file. If you don’t have one, just create it.

<your project root>/android/app/src/main/res/values/strings.xml

Step4: Then, copy-paste the following to your Android Manifest:

<your project root>/android/app/src/main/AndroidManifest.xml

iOS Integration:

Step1: “Register and Configure Your App with Facebook” step in the the Facebook Login documentation for iOS site. (Note: Complete Step 1 and and Step 3 only from the documentation).

Step2: Open Info.plist file as Source Code, copy-paste the following to your Info.plist file, before the ending </dict></plist>

Flutter Code:

Step1: Add below code in package’s pubspec.yaml and run pub get, then run pub get.

Step2: Import below packages in the main.dart file.

Step3: For Facebook login check the below function.

Step4: Here’s the complete code for main.dart file.

Finally, run your code and check the result.

Thanks for reading 🙂

For more interesting blogs check out here – https://mobikul.com/blog/

. . .
Discuss on Helpdesk

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home