title: How to connect facebook, firebase and flutter?
body: <p>I'm following the instructions for incorporating facebook with android projects found here <a href="https://developers.facebook.com/apps/318154048893918/fb-login/quickstart/" rel="nofollow noreferrer">https://developers.facebook.com/apps/318154048893918/fb-login/quickstart/</a> and there is a step to download the Facebook SDK, but after that, it doesn't tell me where to put the file. The import statement it tells me to add won't work (says target of uri doesn't exist).</p>
  
  <p>I'm trying to add the facebook user to our firebase database when they log in. I'm using flutter in android studio.</p>
  
  <p>There doesn't seem to be anything of use in the console log, except that print statement doesn't print anything. Any ideas?</p>
  
  <p>Here's my code to log in the user.</p>
  
  <pre><code>import com.facebook.FacebookSdk;
  import com.facebook.appevents.AppEventsLogger;
  
  Future&lt;FirebaseUser&gt; initiateFacebookLogin() async {
  
  final FacebookLoginResult result =
  await facebookLogin.logInWithReadPermissions(['email', 'public_profile']);
  
  FirebaseUser user =
  await _auth.signInWithFacebook(accessToken: result.accessToken.token);
  //Token: ${accessToken.token}
  
  ProviderDetails userInfo = new ProviderDetails(
      user.providerId, user.uid, user.displayName, user.photoUrl, user.email);
  
  List&lt;ProviderDetails&gt; providerData = new List&lt;ProviderDetails&gt;();
  providerData.add(userInfo);
  print(user.displayName);
  addToDatabase(user.uid, user.displayName, user.displayName, user.email);
  return user;
  
  }
  </code></pre>