{"id":28089259,"url":"https://github.com/hong4rc/node-facebook","last_synced_at":"2025-05-13T12:55:39.470Z","repository":{"id":57311334,"uuid":"131554902","full_name":"hong4rc/node-facebook","owner":"hong4rc","description":"Facebook simulator web browser","archived":false,"fork":false,"pushed_at":"2021-04-23T06:59:56.000Z","size":1200,"stargazers_count":10,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-04-22T08:04:08.582Z","etag":null,"topics":["api","bot","chatbot","cookie","facebook","node-facebook","nodejs","request","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hong4rc.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-30T04:17:07.000Z","updated_at":"2024-06-27T00:09:07.000Z","dependencies_parsed_at":"2022-09-06T04:40:42.559Z","dependency_job_id":null,"html_url":"https://github.com/hong4rc/node-facebook","commit_stats":null,"previous_names":["hongarc/node-facebook"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hong4rc%2Fnode-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hong4rc%2Fnode-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hong4rc%2Fnode-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hong4rc%2Fnode-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hong4rc","download_url":"https://codeload.github.com/hong4rc/node-facebook/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948333,"owners_count":21988953,"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":["api","bot","chatbot","cookie","facebook","node-facebook","nodejs","request","typescript"],"created_at":"2025-05-13T12:55:38.993Z","updated_at":"2025-05-13T12:55:39.455Z","avatar_url":"https://github.com/hong4rc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-facebook\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n\n  [![FOSSA Status shield][fossa-image-shield]][fossa-url]\n  [![NPM Version][npm-image]][npm-url]\n  [![NPM Downloads][downloads-image]][downloads-url]\n  [![License][license-image]][license-url]\n\n  [![Travis][travis-image]][travis-url]\n  [![Codecov][codecov-image]][codecov-url]\n  [![Code style][airbnb-image]][airbnb-url]\n  [![CodeFactor][codefactor-image]][codefactor-url]\n\n\n  [![FOSSA Status large][fossa-image-large]][fossa-url]\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/).\n\nBefore installing, [download and install Node.js](https://nodejs.org/en/download/).\n\nInstallation is done using `npm` or `yarn`:\n\n```bash\n$ npm install node-facebook\nor\n$ yarn add node-facebook\n```\n\nFollow [node-facebook's wiki](https://github.com/Hongarc/node-facebook/wiki)\nfor more information.\n\n### Feature\n\nThis module have function same you use browser.\n\n### Usage\n\n- In first time, you should login with email and password:\n\n- When you logged in, use `api.getState()` to save cookie with this code:\n\n```js\nconst fs = require('fs');\nconst Facebook = require('node-facebook');\n\nconst me = new Facebook({email: 'your username/id', pass: 'your pass'});\nme.login()\n  .then((api) =\u003e {\n    fs.writeFileSync('state.json', JSON.stringify(api.getState()));\n  });\n```\n\n- Now, you can login with cookie with file `state.json`:\n\n```js\nconst me = new Facebook({state: JSON.parse(fs.readFileSync('state.json', 'utf8'))});\n```\n\n### Example\n\n[kiat-bot](https://github.com/Hongarc/kiat-bot) is sample use [node-facebook](https://github.com/Hongarc/node-facebook)\n\n## Credits\n\n`node-facebook` has been inspired by [facebook-chat-api](https://github.com/Schmavery/facebook-chat-api)\nThanks to [Avery Morin](https://github.com/Schmavery) for excellent prior art !\n\n[npm-image]: https://img.shields.io/npm/v/node-facebook.svg\n[npm-url]: https://npmjs.org/package/node-facebook\n\n[downloads-image]: https://img.shields.io/npm/dm/node-facebook.svg\n[downloads-url]: https://npmjs.org/package/node-facebook\n\n[travis-image]: https://travis-ci.com/Hongarc/node-facebook.svg?branch=develop\n[travis-url]: https://travis-ci.com/Hongarc/node-facebook\n\n[codecov-image]: https://codecov.io/gh/Hongarc/node-facebook/branch/develop/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/Hongarc/node-facebook\n\n[airbnb-image]: https://img.shields.io/badge/code%20style-airbnb-ff69b4.svg?logo=airbnb\n[airbnb-url]: https://github.com/airbnb/javascript\n\n[license-image]: https://img.shields.io/github/license/Hongarc/node-facebook.svg?color=blueviolet\n[license-url]: https://github.com/Hongarc/node-facebook/blob/develop/LICENSE\n\n[codefactor-image]: https://www.codefactor.io/repository/github/hongarc/node-facebook/badge\n[codefactor-url]: https://www.codefactor.io/repository/github/hongarc/node-facebook\n\n[fossa-image-shield]: https://app.fossa.io/api/projects/git%2Bgithub.com%2FHongarc%2Fnode-facebook.svg?type=shield\n[fossa-image-large]: https://app.fossa.io/api/projects/git%2Bgithub.com%2FHongarc%2Fnode-facebook.svg?type=large\n[fossa-url]: https://app.fossa.io/projects/git%2Bgithub.com%2FHongarc%2Fnode-facebook\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://fb.com/RemoveU\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/19208123?v=4\" width=\"100px;\" alt=\"Hongarc\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHongarc\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#projectManagement-Hongarc\" title=\"Project Management\"\u003e📆\u003c/a\u003e \u003ca href=\"#review-Hongarc\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/Hongarc/node-facebook/commits?author=Hongarc\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/Hongarc/node-facebook/commits?author=Hongarc\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Schmavery\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/2154522?v=4\" width=\"100px;\" alt=\"Avery Morin\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAvery Morin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-Schmavery\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"http://23phy.github.io\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/11774416?v=4\" width=\"100px;\" alt=\"Oliver Cristian\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eOliver Cristian\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#talk-23phy\" title=\"Talks\"\u003e📢\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhong4rc%2Fnode-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhong4rc%2Fnode-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhong4rc%2Fnode-facebook/lists"}