{"id":43687833,"url":"https://github.com/AntonioCuevaUrraco/nativescript-facebook-login","last_synced_at":"2026-02-16T13:01:56.227Z","repository":{"id":57308514,"uuid":"43799382","full_name":"AntonioCuevaUrraco/nativescript-facebook-login","owner":"AntonioCuevaUrraco","description":"A NativeScript module providing Facebook login for Android and iOS.","archived":false,"fork":false,"pushed_at":"2017-06-05T09:02:09.000Z","size":20789,"stargazers_count":27,"open_issues_count":4,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-24T05:47:48.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonioCuevaUrraco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-07T06:46:05.000Z","updated_at":"2022-05-01T18:36:31.000Z","dependencies_parsed_at":"2022-09-12T10:20:10.086Z","dependency_job_id":null,"html_url":"https://github.com/AntonioCuevaUrraco/nativescript-facebook-login","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AntonioCuevaUrraco/nativescript-facebook-login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCuevaUrraco%2Fnativescript-facebook-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCuevaUrraco%2Fnativescript-facebook-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCuevaUrraco%2Fnativescript-facebook-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCuevaUrraco%2Fnativescript-facebook-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonioCuevaUrraco","download_url":"https://codeload.github.com/AntonioCuevaUrraco/nativescript-facebook-login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCuevaUrraco%2Fnativescript-facebook-login/sbom","scorecard":{"id":14786,"data":{"date":"2025-08-11","repo":{"name":"github.com/AntonioCuevaUrraco/nativescript-facebook-login","commit":"a674bfccbedfc98bc9d6a60dc75e4e4799604afe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T15:31:24.839Z","repository_id":57308514,"created_at":"2025-08-14T15:31:24.839Z","updated_at":"2025-08-14T15:31:24.839Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29508735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-05T03:00:21.768Z","updated_at":"2026-02-16T13:01:56.219Z","avatar_url":"https://github.com/AntonioCuevaUrraco.png","language":"JavaScript","funding_links":[],"categories":["Awesome {N} [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Table of Contents"],"readme":"# nativescript-facebook-login\nA NativeScript module providing Facebook login for Android and iOS.\nThe plugin is using the version 4.7.0 for iOS and the version 4.6.0 for Android \n## Prerequisites\nNativeScript 1.3.0 for Android and iOS since we are using cocoapods and .aar libraries\n## Plugin architecture\n```\n.\n├── app  \u003c----------------run npm install from here\n│   ├── node_modules\n│   │   └── nativescript-facebook-login \u003c-- The install will place the module's code here\n│   │       ├──platforms\n│   │       │  ├──android\n│   │       │  │  └─libs\n│   │       │  │    └─facebook-release.aar \u003c-- This is the SDK for android as a .aar library\n│   │       │  └──ios\n│   │       │     └─Podfile \u003c-- This is the SDK for iOS as a cocoapods dependency \n│   │       ├──facebook-handler.android.js\n│   │       ├──facebook-handler.ios.js \n│   │       ├──LICENSE\n│   │       ├──README\n│   │       └──package.json\n│   ├── package.json \u003c-- The install will register \"nativescript-facebook-login as a dependency here\n│   └── tns_modules\n│       └── ...\n└── \n```\n\n## Installation\ntns plugin add nativescript-facebook-login\n\n### iOS\nFor ios you need to add this to your app.ios to initialize the SDK\n```ts\nvar application = require(\"application\");\n\nclass MyDelegate extends UIResponder implements UIApplicationDelegate {\n  public static ObjCProtocols = [UIApplicationDelegate];\n\n  applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary): boolean {\n   return FBSDKApplicationDelegate.sharedInstance().applicationDidFinishLaunchingWithOptions(application, launchOptions);\n  }\n  \n  applicationOpenURLSourceApplicationAnnotation(application, url, sourceApplication, annotation) {\n    return FBSDKApplicationDelegate.sharedInstance().applicationOpenURLSourceApplicationAnnotation(application, url, sourceApplication, annotation);\n  }\n  \n  applicationDidBecomeActive(application: UIApplication): void {\n      FBSDKAppEvents.activateApp();\n  }\n\n  applicationWillTerminate(application: UIApplication): void {\n    //Do something you want here\n  }\n\n  applicationDidEnterBackground(application: UIApplication): void {\n    //Do something you want here\n  }\n}\n\napplication.ios.delegate = MyDelegate;\napplication.start();\n\n```\n\nAdd to your Info.plist(the one inside platforms/ios/yourApp) the Facebook App ID credentials \n```xml\n\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\t\u003carray\u003e\n\t\t\u003cdict\u003e\n\t\t\t\u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n\t\t\t\u003carray\u003e\n        \u003cstring\u003efb{your-app-id}\u003c/string\u003e\n\t\t\t\u003c/array\u003e\n\t\t\u003c/dict\u003e\n\t\u003c/array\u003e\n\t\u003ckey\u003eCFBundleVersion\u003c/key\u003e\n\t\u003cstring\u003e1.0\u003c/string\u003e\n\t\u003ckey\u003eFacebookAppID\u003c/key\u003e\n  \u003cstring\u003e{your-app-id}\u003c/string\u003e\n\t\u003ckey\u003eFacebookDisplayName\u003c/key\u003e\n\t\u003cstring\u003eFacebookLoginDemo\u003c/string\u003e\n\t\u003ckey\u003eLSApplicationQueriesSchemes\u003c/key\u003e\n\t\u003carray\u003e\n\t\t\u003cstring\u003efbauth2\u003c/string\u003e\n\t\t\u003cstring\u003efbapi\u003c/string\u003e\n\t\t\u003cstring\u003efb-messenger-api\u003c/string\u003e\n\t\t\u003cstring\u003efbshareextension\u003c/string\u003e\n\t\u003c/array\u003e\n```\nFor more information you can consult the official Facebook page for iOS\nhttps://developers.facebook.com/docs/ios\n\n### Android\nAdd to your AndroidManifest.xml (the one inside platforms/android/src/main) the Facebook App ID credentials\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\napplication android:label=\"@string/app_name\" ...\u003e\n    ...\n    \u003cmeta-data android:name=\"com.facebook.sdk.ApplicationId\" android:value=\"@string/facebook_app_id\"/\u003e\n    \u003cactivity android:name=\"com.facebook.FacebookActivity\"\n          android:configChanges=\n                 \"keyboard|keyboardHidden|screenLayout|screenSize|orientation\"\n          android:theme=\"@android:style/Theme.Translucent.NoTitleBar\"\n          android:label=\"@string/app_name\" /\u003e\n\u003c/application\u003e\n```\nAdd to your Strings (platforms/android/src/main/res/values/strings.xml) your facebook app id\n```xml\n\u003cstring name=\"facebook_app_id\"\u003eyour-app-id\u003c/string\u003e\n```\n\nFor more information you can consult the official Facebook page for Android\nhttps://developers.facebook.com/docs/android\n### Common to iOS and Android\n\nRequire the plugin whenever you want to use it\n```ts\nvar FacebookLoginHandler = require(\"nativescript-facebook-login\");\n```\nCreate the callbacks to handle the result of the login\n```ts\n var successCallback = function(result) {\n            //Do something with the result, for example get the AccessToken\n            var token;\n            if (topmost().android){\n              token = result.getAccessToken().getToken();\n            }\n            else if (topmost().ios){\n              token = result.token.tokenString\n            }\n            alert(token);\n        }\n\n        var cancelCallback = function() {\n            alert(\"Login was cancelled\");\n        }\n\n        var failCallback = function(error) {\n            var errorMessage = \"Error with Facebook\";\n           //Try to get as much information as possible from error\n           if (error) {\n                if (topmost().ios) {\n                    if (error.localizedDescription) {\n                        errorMessage += \": \" + error.localizedDescription;\n                    }\n                    else if (error.code) {\n                        errorMessage += \": Code \" + error.code;\n                    }\n                    else {\n                        errorMessage += \": \" + error;   \n                    }\n                }\n                else if (topmost().android) {\n                    if (error.getErrorMessage) {\n                        errorMessage += \": \" + error.getErrorMessage();\n                    }\n                    else if (error.getErrorCode) {\n                        errorMessage += \": Code \" + error.getErrorCode();\n                    }\n                    else {\n                        errorMessage += \": \" + error;   \n                    }\n                }\n            }\n            alert(errorMessage);\n        }  \n```\n\nAnd finally you can start the login process like this\n```ts\n  //Here we select the login behaviour\n\n    //Recomended system account with native fallback for iOS\n    if (topmost().ios) {\n        FacebookLoginHandler.init(2);\n    }\n    //Recomended default for android \n    else if (topmost().android) {\n        FacebookLoginHandler.init();\n    }\n    //Register our callbacks\n    FacebookLoginHandler.registerCallback(successCallback, cancelCallback, failCallback);\n    //Start the login process\n    FacebookLoginHandler.logInWithPublishPermissions([\"publish_actions\"]);      \n```\n\n## Known issues\nSometimes the .aar library with the sdk for android don't get linked to the platform after installing the plugin. This end up in the error:    \nTypeError: Cannot read property 'FacebookSdk' of undefined\nFile: \"/data/data/com.ladeezfirstmedia.ThisOrThat/files/app/tns_modules/nativescript-facebook-login/facebook-handler.js line: 9 column:16   \n\nYou can try to sync the platform\ntns livesync android\n\nYou can try cleaning the platform.\n-remove the plugin\n-remove the platform\n-add the plugin\n-add the platform in that order \n\nYou can try to add manually the dependency\nchange the build.gradle (platforms/android/build.gradle) like this:\n```\ndependencies {\n\t....\n        ....\n    compile \"com.android.support:support-v4:$suppotVer\"\n    compile \"com.android.support:appcompat-v7:$suppotVer\"\n\n    //Facebook sdk\n    compile 'com.facebook.android:facebook-android-sdk:4.6.0'\n     \t....\n        ....\n    \n}\n```\n## Frequently asked questions\n\n### Why Xcode is not building my iOS platform?\n\nAfter installing the plugin CocoaPods creates a .xcworkspace file, use this one to open the project in Xcode instead of the .xcodeproj\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAntonioCuevaUrraco%2Fnativescript-facebook-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAntonioCuevaUrraco%2Fnativescript-facebook-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAntonioCuevaUrraco%2Fnativescript-facebook-login/lists"}