Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: show facebook friends who also use the app

I have a flutter application where you can sign in with Facebook. (https://pub.dev/packages/flutter_facebook_login).

When a user logs in, I create a new FireStore document (the document has the user ID as name). Within, I store other info such as email etc.

The app allows to make 'friends', I do that now by implementing a search bar where you can search for users based on their name.

But is there a possibility to show a user a 'recommended friends' list, that contains all his facebook friends that are also using the app.

I thought of a list of all the fb ID's of his friends and comparing that to the ID's in Firestore? (is that possible with the fb package?)

Thank you!

like image 818
Karel Debedts Avatar asked Aug 20 '19 08:08

Karel Debedts


People also ask

How to connect Facebook app with flutter?

In order to connect our Facebook app with its services with the Flutter project, we are going to make use of the plugin called flutter_facebook_auth. This package enables us to add a Facebook login to our Flutter app, get user information, profile picture, and more.

Why flutter is the best for login?

Because of This most companies have brought out a way for users to login seamlessly through their own apps companies like Facebook, Google and Twitter have made it so that u can log in in 1 click, and with flutter, It has become even simpler to implement.

How to integrate Facebook login in flutter with pubspec?

In this tutorial, you introduce the Facebook Login Flutter plugin by adding a single line to the pubspec.yaml file. Download the package with the following command: For an example project that illustrates how to integrate Facebook Login into an Android app, see the FBLoginSample on… Create a new file /app/src/main/res/values/strings.xml

What is flutter Lutter?

F lutter is Google’s mobile app SDK for crafting high-quality native experiences on iOS and Android in record time. What you’ll build? In this tutorial, you’ll build a mobile app featuring a Facebook Login using the Flutter SDK.


1 Answers

You can use user_friends Facebook api. You must before get permission to use it from Facebook. It returns only user friends that are using same application.

like image 185
Hamza Avatar answered Oct 12 '22 13:10

Hamza