{"id":15013483,"url":"https://github.com/meteorrn/oauth-facebook","last_synced_at":"2026-02-03T17:39:05.685Z","repository":{"id":102479028,"uuid":"398876170","full_name":"meteorrn/oauth-facebook","owner":"meteorrn","description":"Accounts Facebook for Meteor React Native","archived":false,"fork":false,"pushed_at":"2024-02-22T01:45:22.000Z","size":1507,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-06-14T12:05:17.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meteorrn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["jankapunkt"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-08-22T18:56:21.000Z","updated_at":"2024-08-18T01:46:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc9d0ec6-e561-452a-8e7b-9a882fd8caa2","html_url":"https://github.com/meteorrn/oauth-facebook","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"5fc6df312b4154c01d00593811208ac90d54770d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meteorrn/oauth-facebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorrn%2Foauth-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorrn%2Foauth-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorrn%2Foauth-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorrn%2Foauth-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meteorrn","download_url":"https://codeload.github.com/meteorrn/oauth-facebook/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorrn%2Foauth-facebook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261786868,"owners_count":23209563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:44:20.567Z","updated_at":"2026-02-03T17:39:00.657Z","avatar_url":"https://github.com/meteorrn.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jankapunkt"],"categories":[],"sub_categories":[],"readme":"# Accounts Facebook for Meteor React Native.\n\n## Prerequisites\n\nHave RN \u003e= 0.63.3\n\n## Installation\n\nIn your react native app, run the following command to install it:\n\n```shell\nnpm install @meteorrn/oauth-facebook\n```\n\nIn your meteor app, make sure you have installed the following packages:\n\n```\nmeteor add accounts-base accounts-password account-facebook service-configuration\n```\n\nAnd add this configuration in a server's file:\n\n```js\nimport { Meteor } from 'meteor/meteor';\nimport { ServiceConfiguration } from 'meteor/service-configuration';\n\nif (Meteor.isDevelopment) {\n    if (Meteor.settings.private?.OAUTH?.facebook) {\n        process.env.OAUTH_FACEBOOK_APP_ID = Meteor.settings.private.OAUTH.facebook.APP_ID;\n        process.env.OAUTH_FACEBOOK_SECRET = Meteor.settings.private.OAUTH.facebook.SECRET;\n    } else {\n        console.warn('[App name] - Facebook OAuth settings are not configured.');\n        process.env.OAUTH_FACEBOOK_APP_ID = '';\n        process.env.OAUTH_FACEBOOK_SECRET = '';\n    }\n}\n\nServiceConfiguration.configurations.upsert({ service: 'facebook' }, {\n    $set: {\n        appId: process.env.OAUTH_FACEBOOK_APP_ID,\n        loginStyle: \"popup\",\n        secret: process.env.OAUTH_FACEBOOK_SECRET\n    }\n});\n```\n\nMake sure you have environment variables configured in your `settings-settings.json` file:\n\n```json\n{\n  \"private\": {\n    \"ROOT_URL\": \"http://localhost\",\n    \"OAUTH\": {\n      \"facebook\": {\n        \"APP_ID\": \"yourAppId\",\n        \"SECRET\": \"yourSecret\"\n      }\n    }\n  }\n}\n```\n\n\n### Configuration for Android\n\nBefore you can run the project, follow\nthe [Getting Started Guide](https://developers.facebook.com/docs/android/getting-started/) for Facebook Android SDK to\nset up a Facebook app. You can skip the build.gradle changes since that's taken care of by the rnpm link step above,\nbut **make sure** you follow the rest of the steps such as updating `strings.xml` and `AndroidManifest.xml`.\n\n### Configuration for iOS\n\nFollow ***steps 3 and 4*** in the [Getting Started Guide](https://developers.facebook.com/docs/ios/use-cocoapods) for\nFacebook SDK for iOS.\n\n**If you're not using cocoapods already** you can also follow step 1.1 to set it up.\n\n**If you're using React Native's RCTLinkingManager**\n\nThe `AppDelegate.m` file can only have one method for `openUrl`. If you're also using `RCTLinkingManager` to handle deep\nlinks, you should handle both results in your `openUrl` method.\n\n```objetive-c\n#import \u003cFBSDKCoreKit/FBSDKCoreKit.h\u003e // \u003c- Add This Import\n#import \u003cReact/RCTLinkingManager.h\u003e // \u003c- Add This Import\n\n- (BOOL)application:(UIApplication *)app\n            openURL:(NSURL *)url\n            options:(NSDictionary\u003cUIApplicationOpenURLOptionsKey,id\u003e *)options\n{\n  if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {\n    return YES;\n  }\n\n  if ([RCTLinkingManager application:app openURL:url options:options]) {\n    return YES;\n  }\n\n  return NO;\n}\n```\n\n## Usage\n\n### SDK Initialization\n\nTo comply with Apple privacy requirements, for iOS the `autoInitEnabled` option is removed\nfrom [facebook-ios-sdk#v9.0.0](https://github.com/facebook/facebook-ios-sdk/blob/master/CHANGELOG.md#900).\n\nUsing this module, Platform-neutral SDK Initialization is used to comply with this requirement. So, you don't need to\nconfigure anything else. For further information, please visit this [link](https://github.com/thebergamo/react-native-fbsdk-next#sdk-initialization).\n\n### Login\n\n```js\nimport { Component } from 'react';\nimport { View } from 'react-native';\nimport Meteor from '@meteorrn/core';\nimport '@meteorrn/oauth-facebook';//this should be inside of meteorrn/core package (PR is needed).\nimport FacebookButton from './path/to/customFacebookButton';\n\nexport default class Login extends Component {\n\n    handleLoginFB() {\n        Meteor.loginWithFacebook({ requestPermissions: ['email', 'public_profile'] }, (error) =\u003e {\n            if (!error) {\n                //Do anything\n            } else {\n                console.error('There was an error in login with Facebook: ', error);\n            }\n        });\n    }\n\n    render() {\n        return (\n            \u003cView\u003e\n                \u003cFacebookButton onPress={ handleLoginFB }/\u003e\n            \u003c/View\u003e\n        );\n    }\n};\n```\n\nIf you want to do **logout**, remember to use this way:\n\n```js\nMeteor.logoutFromFacebook();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorrn%2Foauth-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteorrn%2Foauth-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorrn%2Foauth-facebook/lists"}