Skip to content

Instantly share code, notes, and snippets.

View PaperMonster's full-sized avatar

Rasita Satianrapapong PaperMonster

  • ShobShop Media Co. Ltd.
  • Bangkok
View GitHub Profile
@PaperMonster
PaperMonster / fb-graph-gender-birthday.js
Created February 8, 2023 07:53
Get gender and birthday from Facebook Graph API in React Native
import {
LoginManager as FBLoginManager,
GraphRequest, GraphRequestManager
} from 'react-native-fbsdk-next';
function getGenderAndBirthdayFromFacebookLogin() {
FBLoginManager.logInWithPermissions(['public_profile', 'user_gender', 'user_birthday'])
.then((result) => {
if (result.error) {
showAlert('ไม่สามารถล็อกอิน Facebook ได้', result.error.message)