Created
January 13, 2017 23:28
-
-
Save mtheoryx/35ed6cf282c488dcb5e2146fe1211ecf to your computer and use it in GitHub Desktop.
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
| shareToFacebookPress() { | |
| const timeNow = Date.now(); | |
| const facebookToken = this.props.facebook_token; | |
| console.log(facebookToken); | |
| const facebookExpiry = this.props.facebook_token_expiry * 1000; | |
| console.log(facebookExpiry); | |
| if (facebookToken == null || facebookExpiry < timeNow) { | |
| console.log("doesn't exist"); | |
| this.props.signInFacebook(); | |
| } else { | |
| this.state.shareToFacebook ? | |
| this.setState({ shareToFacebook: false }) : | |
| this.setState({ shareToFacebook: true }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment