Skip to content

Instantly share code, notes, and snippets.

krissanawat101 krissnawat

Block or report user

Report or block krissnawat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View facebook button.js
<RoundedButton
text="Connect to Facebook"
textColor={colors.green01}
backgroundColor={colors.white}
icon={
<Icon name="facebook" size={20} style={styles.facebookIcon} />
}
onPress={() => this.FacebookLogin()}
/>
View facebooklogin.js
async FacebookLogin() {
const result = await LoginManager.logInWithPermissions([
"public_profile",
"email"
]);
if (result.isCancelled) {
throw new Error("User cancelled the login process");
}
const data = await AccessToken.getCurrentAccessToken();
View appdelegate.m
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url options:options]
];
// Add any custom logic here.
return handled;
}
View info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{your-app-id}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
View yarn
yarn add ract-native-fbsdk
View InputField.js
<Text style={styles.ForgotPasswordSubHeading}>
Enter your email to find account.
</Text>
<InputField
customStyle={{ marginTop: 100 }}
textColor={colors.white}
labelText="EMAIL ADDRESS"
labelTextSize={14}
labelColor={colors.white}
borderBottomColor={colors.white}
View navigationOptions.js
static navigationOptions = ({ navigation }) => ({
headerStyle: {
borderBottomWidth: 0,
elevation: 0
},
headerTransparent: true,
headerTintColor: colors.white
});
View StyleSheet.js
const styles = StyleSheet.create({
wrapper: {
display: "flex",
flex: 1,
backgroundColor: colors.green01
},
form: {
marginTop: 90,
paddingLeft: 20,
paddingRight: 20,
You can’t perform that action at this time.