UNPKG

1.6 kBSource Map (JSON)View Raw
1{"version":3,"file":"Facebook.js","sourceRoot":"","sources":["../src/Facebook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAalD,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,KAAa,EACb,OAAyB;IAEzB,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,EAAE;QACnD,MAAM,IAAI,mBAAmB,CAAC,UAAU,EAAE,+BAA+B,CAAC,CAAC;KAC5E;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,CAAC,IAAI,CACV,2EAA2E,OAAO,KAAK,KAAK,CAC7F,CAAC;QACF,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;KACvB;IAED,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC3C,OAAO,GAAG,EAAE,CAAC;KACd;IACD,OAAO,gBAAgB,CAAC,6BAA6B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-errors';\n\nimport ExponentFacebook from './ExponentFacebook';\n\ntype FacebookLoginResult = {\n type: string;\n token?: string;\n expires?: number;\n};\n\ntype FacebookOptions = {\n permissions?: string[];\n behavior?: 'web' | 'native' | 'browser' | 'system';\n};\n\nexport async function logInWithReadPermissionsAsync(\n appId: string,\n options?: FacebookOptions\n): Promise<FacebookLoginResult> {\n if (!ExponentFacebook.logInWithReadPermissionsAsync) {\n throw new UnavailabilityError('Facebook', 'logInWithReadPermissionsAsync');\n }\n if (typeof appId !== 'string') {\n console.warn(\n `logInWithReadPermissionsAsync: parameter 'appId' must be a string, was '${typeof appId}''.`\n );\n appId = String(appId);\n }\n\n if (!options || typeof options !== 'object') {\n options = {};\n }\n return ExponentFacebook.logInWithReadPermissionsAsync(appId, options);\n}\n"]}
\No newline at end of file