Skip to content

Instantly share code, notes, and snippets.

@rohan20
Last active August 14, 2018 09:52
Show Gist options
  • Save rohan20/b87b8db8dbba6edb4f0a07955be57bb8 to your computer and use it in GitHub Desktop.
Save rohan20/b87b8db8dbba6edb4f0a07955be57bb8 to your computer and use it in GitHub Desktop.
Flutter Facebook login
case FacebookLoginStatus.loggedIn:
print("LoggedIn");
var graphResponse = await http.get(
'https://graph.facebook.com/v2.12/me?fields=name,first_name,last_name,email&access_token=${facebookLoginResult
.accessToken.token}');
var profile = json.decode(graphResponse.body);
print(profile.toString());
onLoginStatusChanged(true, profileData: profile);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment