Last active
August 14, 2018 09:52
-
-
Save rohan20/b87b8db8dbba6edb4f0a07955be57bb8 to your computer and use it in GitHub Desktop.
Flutter Facebook login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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