{"id":15142015,"url":"https://github.com/rajivnarayana/nativescript-facebook-account-kit","last_synced_at":"2026-01-15T22:57:52.268Z","repository":{"id":46693910,"uuid":"131486190","full_name":"rajivnarayana/nativescript-facebook-account-kit","owner":"rajivnarayana","description":"A {N} plugin for integrating Account Kit.","archived":false,"fork":false,"pushed_at":"2023-01-07T02:21:27.000Z","size":3631,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T11:42:34.447Z","etag":null,"topics":["accountkit","accountkit-plugin","nativescript","nativescript-plugin"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajivnarayana.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":"2018-04-29T10:45:04.000Z","updated_at":"2024-05-30T17:33:17.000Z","dependencies_parsed_at":"2023-02-06T10:31:28.343Z","dependency_job_id":null,"html_url":"https://github.com/rajivnarayana/nativescript-facebook-account-kit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajivnarayana%2Fnativescript-facebook-account-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajivnarayana%2Fnativescript-facebook-account-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajivnarayana%2Fnativescript-facebook-account-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajivnarayana%2Fnativescript-facebook-account-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajivnarayana","download_url":"https://codeload.github.com/rajivnarayana/nativescript-facebook-account-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128739,"owners_count":20888234,"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":["accountkit","accountkit-plugin","nativescript","nativescript-plugin"],"created_at":"2024-09-26T09:21:48.449Z","updated_at":"2026-01-15T22:57:52.236Z","avatar_url":"https://github.com/rajivnarayana.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook Account Kit plugin for NativeScript (Unofficial)\n\nThis plugin is a wrapper in {N} around the native facebook's Account Kit's iOS and Android plugins.\n\nRefer to facebook's [docs](https://developers.facebook.com/docs/accountkit/) to understand how Account Kit works and how to set it up on Facebook's developer portal.\n\n## Installation\n\n```shell\ntns plugin add nativescript-facebook-account-kit\n```\n\n### iOS\nOn `iOS`, Add the following to your `Info.plist` found under `/app/App_Resources/iOS` somewhere inside `\u003cdict /\u003e`\n```xml\n    \u003ckey\u003eFacebookAppID\u003c/key\u003e\n\t\u003cstring\u003e\u003c!--Your app id from developer portal--\u003e\u003c/string\u003e\n\t\u003ckey\u003eAccountKitClientToken\u003c/key\u003e\n\t\u003cstring\u003e\u003c!--Client token from dev portal--\u003e\u003c/string\u003e\n\t\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\t\t\t\t\u003cstring\u003eak\u003c!--Your app id from developer portal--\u003e\u003c/string\u003e\n\t\t\t\u003c/array\u003e\n\t\t\u003c/dict\u003e\n\t\u003c/array\u003e\n```\n\n### Android\nOn `Android`, Add the following to `AndroidManifest.xml` inside the `\u003capplication\u003e` tag.\n```xml\n\t\u003cmeta-data android:name=\"com.facebook.accountkit.ApplicationName\"\n\t\t\t\tandroid:value=\"@string/app_name\" /\u003e\n\t\u003cmeta-data android:name=\"com.facebook.sdk.ApplicationId\"\n\t\t\tandroid:value=\"@string/FACEBOOK_APP_ID\" /\u003e\n\t\u003cmeta-data android:name=\"com.facebook.accountkit.ClientToken\"\n\t\t\tandroid:value=\"@string/ACCOUNT_KIT_CLIENT_TOKEN\" /\u003e\n\n\t\u003cactivity android:name=\"com.facebook.accountkit.ui.AccountKitActivity\" \u003e\n\t\t\u003cintent-filter\u003e\n\t\t\t\t\u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n\t\t\t\u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n\t\t\t\u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n\t\t\t\u003cdata android:scheme=\"ak\u003cYour Facebook app id\u003e\" /\u003e\n\t\t\u003c/intent-filter\u003e\n\t\u003c/activity\u003e\n    \n```\n\nAdd the following as your `strings.xml` file under `app/App_Resources/Android/src/main/res/values/strings.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003cstring name=\"app_name\"\u003eYour App Name \u003c/string\u003e\n    \u003cstring name=\"title_activity_kimera\"\u003eYour App name\u003c/string\u003e\n    \u003cstring name=\"FACEBOOK_APP_ID\"\u003eFACEBOOK_APP_ID\u003c/string\u003e\n    \u003cstring name=\"ACCOUNT_KIT_CLIENT_TOKEN\"\u003eACCOUNT_KIT_CLIENT_TOKEM\u003c/string\u003e\n\u003c/resources\u003e\n```\n\n#### Account Kit and Google Play Services Version\nThe plugin will default to [this version](https://github.com/rajivnarayana/nativescript-facebook-account-kit/blob/master/src/platforms/android/include.gradle) of the Android `play-services-auth` SDK and `account-kit-sdk` SDK.\nIf you need to change the versions (to for instance the latest version), you can add  project ext properties `googlePlayServicesVersion` and `accountKitVersion` to `app/App_Resources/Android/app.gradle`:\n\n```\nproject.ext {\n   googlePlayServicesVersion = \"+\"\n   accountKitVersion = \"+\"\n}\n```\n\n## Usage \n\nInitialize the plugin with the response type you seek either `AuthorizationCode` or `AccessToken`\n```typescript\nimport { FacebookAccountKit, AccountKitResponseType } from 'nativescript-facebook-account-kit';\nconst facebookAccountKit = new FacebookAccountKit(AccountKitResponseType.AuthorizationCode);\n```\n```typescript\nimport { Color } from \"tns-core-modules/color\";\n\nconst options : AccountKitOptions = {\n      prefillPhoneNumber : \"9XXXX12345\", \n      prefillCountryCode : \"91\",\n      defaultCountryCode : \"IN\",\n      whitelistedCountryCodes : [\"IN\"],\n      blacklistedCountryCodes : [],\n      enableGetACall : true,\n      presentAnimated : false,\n\t  enableSendToFacebook : true,\n\t  primaryColor : new Color(\"orange\")\n    };\n    this.facebookAccountKit.loginWithPhoneNumber(options).then(authCode =\u003e {\n      this.authCode = authCode;\n      console.log(authCode);\n    }, error =\u003e {\n      this.authCode = error.message;\n      console.error(error);\n    });\n```\n\n## API\n    \n| Method | Description | Return type |\n| --- | --- | --- |\n| loginWithPhoneNumber | Use account kit login flow with lot of options. | A promise that resolves to either authorization code or access token. |\n| loginWithEmail | Use account kit email flow. | A promise that resolves to either authorization code or access token. |\n\n## License\n\nApache License Version 2.0, January 2004\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajivnarayana%2Fnativescript-facebook-account-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajivnarayana%2Fnativescript-facebook-account-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajivnarayana%2Fnativescript-facebook-account-kit/lists"}