Check Mobile App
Read now
Start a Project

Facebook Sign in Flutter

Save

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.

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/

. . .

Leave a Comment

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


Be the first to comment.

css.php

Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.

Osama
Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

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

    Back to Home