Skip to content

Instantly share code, notes, and snippets.

@pfulop
Created February 8, 2017 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfulop/278bb6e89a600c8083f2ad192262c7d5 to your computer and use it in GitHub Desktop.
Save pfulop/278bb6e89a600c8083f2ad192262c7d5 to your computer and use it in GitHub Desktop.
<LoginButton
publishPermissions={["publish_actions"]}
onLoginFinished={
(error, result) => {
if (error) {
alert("login has error: " + result.error);
} else if (result.isCancelled) {
alert("login is cancelled.");
} else {
AccessToken.getCurrentAccessToken().then(
(data) => {
this.props.loginWithFacebook(data.accessToken.toString());
}
)
}
}
}
onLogoutFinished={() => alert("logout.")}/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment