{"_id":"ngx-facebook","_rev":"7-5e1c6dffde69ae8d5a2145607e4656f2","name":"ngx-facebook","description":"Facebook SDK bindings for Angular applications","dist-tags":{"latest":"3.0.0-0"},"versions":{"2.4.0":{"name":"ngx-facebook","version":"2.4.0","description":"Facebook TypeScript SDK for Angular2","module":"dist/esm/index.js","typings":"dist/esm/index.d.ts","main":"dist/umd/index.js","scripts":{"prebuild":"rm -rf aot dist","build":"gulp build","postbuild":"rm -rf aot","build:dev":"npm run build && cp -r dist ../ng2-facebook-sdk-example/node_modules/ngx-facebook/","pretest":"rm -rf dist && tsc","test":"karma start karma.conf.js --single-run","pretest:watch":"npm run pretest","test:watch":"concurrently \"tsc -w\" \"karma start karma.conf.js\"","docs":"zm-docs-gen","postversion":"npm run changelog","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","postchangelog":"git commit -am \"chore(): update changelog\"","lint":"tslint \"src/**/*.ts\"","prepublish":"npm run lint && npm run build"},"repository":{"type":"git","url":"git+https://github.com/zyra/ngx-facebook.git"},"keywords":["facebook","angular2","sdk"],"author":{"name":"Zyra Media Inc."},"license":"MIT","bugs":{"url":"https://github.com/zyra/ngx-facebook/issues"},"homepage":"https://github.com/zyra/ngx-facebook","devDependencies":{"@angular/common":"4.0.0","@angular/compiler":"4.0.0","@angular/compiler-cli":"4.0.0","@angular/core":"4.0.0","@angular/platform-browser":"4.0.0","@angular/platform-browser-dynamic":"4.0.0","@types/fs-extra":"^2.0.0","@types/gulp":"^4.0.2","@types/jasmine":"^2.5.47","@types/node":"^7.0.12","@zyramedia/docs-gen":"^1.7.0","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.24.0","codelyzer":"^2.1.1","concurrently":"^3.4.0","conventional-changelog-cli":"^1.3.1","core-js":"^2.4.1","fs-extra":"^2.1.2","gulp":"git+https://github.com/gulpjs/gulp.git#4.0","jasmine-core":"^2.5.2","karma":"^1.5.0","karma-babel-preprocessor":"^6.0.1","karma-chrome-launcher":"^2.0.0","karma-cli":"^1.0.1","karma-jasmine":"^1.1.0","karma-jasmine-html-reporter":"^0.2.2","karma-phantomjs-launcher":"^1.0.4","karma-sauce-launcher":"^1.1.0","lodash":"^4.17.4","rxjs":"5.1.1","systemjs":"^0.20.11","ts-node":"^3.0.2","tslint":"4.5.1","tslint-eslint-rules":"^3.5.1","typescript":"^2.2.2","zone.js":"0.8.5"},"gitHead":"916ae4b82c1a4c1638f56cc43d2deb91b7536290","_id":"ngx-facebook@2.4.0","_shasum":"454141ce41118c1956d9db896c956f3891f8bbd7","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"ihadeed","email":"i.hadeed@zyra.ca"},"dist":{"shasum":"454141ce41118c1956d9db896c956f3891f8bbd7","tarball":"https://registry.npmjs.org/ngx-facebook/-/ngx-facebook-2.4.0.tgz","integrity":"sha512-QPOS956LwvZAAMCMYxi1y7MA9ffjxc1FL13RZV/M5oDV9574e+rhIRLcH7yOVhFEF50gEwaid62B+chlHL0IbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsL37xxZ4FMFQpy/LKQCrcqG4ld++fHTvm3otUdSTnWAiA/VQvwnRvcm+tChQZE8qtCfnuUlwzsHfzUrMsUz+cRnQ=="}]},"maintainers":[{"name":"ihadeed","email":"i.hadeed@zyra.ca"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ngx-facebook-2.4.0.tgz_1492550710123_0.05897376453503966"},"directories":{}},"3.0.0-0":{"name":"ngx-facebook","version":"3.0.0-0","description":"Facebook SDK bindings for Angular applications","repository":{"type":"git","url":"git+https://github.com/zyra/ngx-facebook.git"},"keywords":["facebook","angular2","sdk"],"author":{"name":"Zyra Media Inc."},"license":"MIT","bugs":{"url":"https://github.com/zyra/ngx-facebook/issues"},"homepage":"https://github.com/zyra/ngx-facebook","main":"bundles/ngx-facebook.umd.js","module":"fesm5/ngx-facebook.js","es2015":"fesm2015/ngx-facebook.js","esm5":"esm5/ngx-facebook.js","esm2015":"esm2015/ngx-facebook.js","fesm5":"fesm5/ngx-facebook.js","fesm2015":"fesm2015/ngx-facebook.js","typings":"ngx-facebook.d.ts","metadata":"ngx-facebook.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.10.0"},"_id":"ngx-facebook@3.0.0-0","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-FCb89nC5yQc9uxr23kP/khsLN+TsSvL1EK5dnGna1iD7/buANLbxiNasE0ujj6ssxc3l5HCVvimS7YptTSPWZg==","shasum":"18d14d178a9c4d566dd87a6ea9f1688da438b65d","tarball":"https://registry.npmjs.org/ngx-facebook/-/ngx-facebook-3.0.0-0.tgz","fileCount":81,"unpackedSize":664424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5gcpCRA9TVsSAnZWagAALjYP/1Ykqe0iho8f+zWq3xQW\nQOEEcFHLG7F7aA36+fImigY64muJfQH3XDZFEfrJeZofTTrZFHIFVPIGm3h1\nLrsioIz+7Kt5poTy8PViVI1AzMqa+6zwCsZkkpii63fjJwh0yDyWpJCKNI5P\n41BmngAJheuqrXgdVSTJeJUZZAsFJQKj79jpMQvSWQ0ZTeOViej5zTg4iWV0\n1XqOiNWiboOZRXOjfOAeY6/rZdRHf0xNFVVa6BJEF5YMEYQllFHrTbaihn8N\nsIURKsMqcvnRhrsXQNQj7xsuCkIUnO3snzv8BYGbduKkIF2SLWPwcALAmnlI\nVvGzDlcaEMtFCvN9k74pmJFZZjh+md4mVGeCNaBKTVm6D7stRS+ZjsUUQQaG\n1VX9Ibvb75fIfckEfkcx9YZEY+dkBcGIZwhmCACEWO8nZh86vFL/C0XrKiV8\nUy7D/l3v6viaiQL28jUzfU4A8UAKa/qIVKgTxLO9BzIQjubUEPnwaX9fgQ71\nIFia3oWzMqYPNRtG4urX8Mhk79IUktaJvJK12Vx2dTc6swpzrtdXpoOwqb8I\nLN9UIcUxRnYQfxm1povxjCjOpmM0i3coaD8JQD+f+35sU3rFiWUOSlHxtrOI\n3wmadKgaeuIBmUv4QhmYzGTsq3hfFBDnVjNyE685THDBAOKV4Nwtk5lAzJdz\njPai\r\n=tZcQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1Cps5dVOmt1jgtpbszx2NaifhJI3N5QtlOFksghg+FAiAXJH7KnBxFk15+dgeODVWVQYWEKQISgylFiEFObzS2UQ=="}]},"maintainers":[{"email":"ibby@zyra.ca","name":"ihadeed"}],"_npmUser":{"name":"ihadeed","email":"ibby@zyra.ca"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-facebook_3.0.0-0_1592133417114_0.4430442444388658"},"_hasShrinkwrap":false}},"readme":"# ngx-facebook\n\nThis is a wrapper for the official Facebook JavaScript SDK. It makes it easier to use Facebook SDK with Angular by providing components, providers and types.\n\n[![npm](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/ngx-facebook)\n[![Build Status](https://drone.zyra.ca/api/badges/zyra/ngx-facebook/status.svg)](https://drone.zyra.ca/zyra/ngx-facebook)\n[![npm](https://img.shields.io/npm/dt/ngx-facebook.svg)](https://www.npmjs.com/package/ngx-facebook)\n[![npm](https://img.shields.io/npm/dm/ngx-facebook.svg)](https://www.npmjs.com/package/ngx-facebook)\n\n## Installation\n\n#### 1. Install via NPM:\n\n```shell\nnpm i -S ngx-facebook\n```\n\n#### 2. Add the Facebook JavaScript SDK to your index.html\n\n```html\n<script type=\"text/javascript\" src=\"https://connect.facebook.net/en_US/sdk.js\"></script>\n```\n\n#### 3. Import `FacebookModule` into your app's root module\n\n```typescript\nimport { FacebookModule } from 'ngx-facebook';\n\n@NgModule({\n  ...\n  imports: [\n    FacebookModule.forRoot()\n  ],\n  ...\n})\nexport class AppModule { }\n```\n\n#### 4. Inject `FacebookService` and call the `init` method (optional):\n\nThis method must be called before using [`login`](https://zyra.github.io/ngx-facebook/facebook-service/#login) or [`api`](https://zyra.github.io/ngx-facebook/facebook-service/#api) methods. It is not required for other methods/components.\n\n```typescript\nimport { FacebookService, InitParams } from 'ngx-facebook';\n\n...\n\nexport class MyComponentOrService {\n\n  constructor(private fb: FacebookService) {\n\n    const initParams: InitParams = {\n      appId: '1234566778',\n      xfbml: true,\n      version: 'v2.8'\n    };\n\n    fb.init(initParams);\n\n  }\n\n}\n```\n\n## Documentation\n\nYou can view complete and detailed documentation by visiting https://zyra.github.io/ngx-facebook/.\n\n## Example Usage\n\nYou can view our [example project here](https://zyra.github.io/ngx-facebook-example/) and/or view its [source code here](https://github.com/zyra/ngx-facebook-example/)\n\n### Example of login with Facebook\n\n```typescript\nimport { FacebookService, LoginResponse } from 'ngx-facebook';\n\n@Component(...)\nexport class MyComponent {\n\n  constructor(private fb: FacebookService) { }\n\n  loginWithFacebook(): void {\n\n    this.fb.login()\n      .then((response: LoginResponse) => console.log(response))\n      .catch((error: any) => console.error(error));\n  }\n\n}\n```\n\n### Example of sharing on Facebook\n\n```typescript\nimport { FacebookService, UIParams, UIResponse } from 'ngx-facebook';\n\n...\n\nshare(url: string) {\n\n  const params: UIParams = {\n    href: 'https://github.com/zyra/ngx-facebook',\n    method: 'share'\n  };\n\n  this.fb.ui(params)\n    .then((res: UIResponse) => console.log(res))\n    .catch((e: any) => console.error(e));\n\n}\n```\n\n### Example of adding a Facebook like button\n\n```html\n<fb-like href=\"https://github.com/zyra/ngx-facebook\"></fb-like>\n```\n\n### Example of playing a Facebook video\n\n#### Basic video component usage:\n\n```html\n<fb-video href=\"https://www.facebook.com/facebook/videos/10153231379946729/\"></fb-video>\n```\n\n#### Advanced video component usage:\n\n```html\n<fb-video href=\"https://www.facebook.com/facebook/videos/10153231379946729/\" (paused)=\"onVideoPaused($event)\"></fb-video>\n```\n\n```typescript\nimport { Component, ViewChild } from '@angular/core';\nimport { FBVideoComponent } from 'ngx-facebook';\n\n@Component(...)\nexport class MyComponent {\n\n  @ViewChild(FBVideoComponent) video: FBVideoComponent;\n\n  ngAfterViewInit() {\n    this.video.play();\n    this.video.pause();\n    this.video.getVolume();\n  }\n\n  onVideoPaused(ev: any) {\n    console.log('User paused the video');\n  }\n\n}\n```\n\n## Versioning\n\nWe use [SemVer](https://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/zyra/ngx-facebook/tags).\n\n## Contribution\n\n- **Having an issue**? or looking for support? [Open an issue](https://github.com/zyra/ngx-facebook/issues/new) and we will get you the help you need.\n- Got a **new feature or a bug fix**? Fork the repository, make your changes, and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Support this project\n\nIf you find this project useful, please star the repository to let people know that it's reliable. Also, share it with friends and colleagues that might find this useful as well. Thank you :smile:\n","maintainers":[{"email":"ibby@zyra.ca","name":"ihadeed"}],"time":{"modified":"2022-06-21T08:11:57.904Z","created":"2017-04-18T21:25:12.135Z","2.4.0":"2017-04-18T21:25:12.135Z","3.0.0-0":"2020-06-14T11:16:57.242Z"},"homepage":"https://github.com/zyra/ngx-facebook","keywords":["facebook","angular2","sdk"],"repository":{"type":"git","url":"git+https://github.com/zyra/ngx-facebook.git"},"author":{"name":"Zyra Media Inc."},"bugs":{"url":"https://github.com/zyra/ngx-facebook/issues"},"license":"MIT","readmeFilename":"README.md","users":{"stmarco":true,"dnarvaez":true}}