{"id":13529369,"url":"https://github.com/specious/facebook-cli","last_synced_at":"2025-05-16T18:09:27.142Z","repository":{"id":40693642,"uuid":"67542153","full_name":"specious/facebook-cli","owner":"specious","description":":computer: Facebook command line client (needs to be updated)","archived":false,"fork":false,"pushed_at":"2022-05-12T11:59:16.000Z","size":3164,"stargazers_count":393,"open_issues_count":18,"forks_count":35,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-12T17:00:09.325Z","etag":null,"topics":["command-line","facebook","facebook-api"],"latest_commit_sha":null,"homepage":"https://asciinema.org/a/87129","language":"Ruby","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/specious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-06T19:58:54.000Z","updated_at":"2025-04-07T12:06:47.000Z","dependencies_parsed_at":"2022-07-14T06:30:30.732Z","dependency_job_id":null,"html_url":"https://github.com/specious/facebook-cli","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specious%2Ffacebook-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specious%2Ffacebook-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specious%2Ffacebook-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specious%2Ffacebook-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/specious","download_url":"https://codeload.github.com/specious/facebook-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254096747,"owners_count":22014093,"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":["command-line","facebook","facebook-api"],"created_at":"2024-08-01T07:00:35.774Z","updated_at":"2025-05-16T18:09:27.094Z","avatar_url":"https://github.com/specious.png","language":"Ruby","readme":"# Facebook CLI\n\nFacebook functionality from the command line.\n\n[![Download the gem at https://rubygems.org/gems/facebook-cli](https://img.shields.io/gem/v/facebook-cli.svg)](https://rubygems.org/gems/facebook-cli)\n[![Join the chat at https://gitter.im/facebook-cli/discuss](https://badges.gitter.im/chat.svg)](https://gitter.im/facebook-cli/discuss)\n[![Take a moment to thank @specious](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/specious)\n\n## Demo\n\n\u003ca href=\"https://asciinema.org/a/87129\"\u003e\u003cimg src=\"https://asciinema.org/a/87129.png\" width=\"400\"/\u003e\u003c/a\u003e\n\n## Install\n\n`gem install facebook-cli` *(might require sudo)*\n\n## Facebook setup\n\nTo interact with the Facebook API you must create and configure a Facebook application for your personal use. Follow these instructions carefully:\n\n- Go to https://developers.facebook.com/apps and create a new app ([screenshot](doc/images/initial-configuration/create-new-app.png))\n- Set up a new \"Facebook Login\" product\n- **Don't bother choosing a platform.** Instead click \"Settings\" under \"Facebook Login\" in the side bar\n- Under \"Valid OAuth redirect URIs\", add: `https://localhost:3333/` (this is needed to receive auth code during authentication)\n- Click \"Save Changes\"\n- Go to \"App Review\" and make your app public\n- Go to \"Settings\" \u003e \"Basic\"\n- Under \"App Secret\" click \"Show\" to reveal your app secret\n- Open a terminal and save your App ID and App Secret by running: ([screenshot](doc/images/initial-configuration/save-app-id-and-app-secret.png))\u003cbr\u003e\n\n  ```\n  facebook-cli config --appid=\u003capp-id\u003e --appsecret=\u003capp-secret\u003e\n  ```\n\n## Logging in\n\nOnce the [Facebook app is configured](#facebook-setup), you must authorize it to access the social graph on your behalf:\n\n- In a terminal, run: `facebook-cli login` ([screenshot](doc/images/login-procedure/facebook-cli-login.png))\n  - (If authenticating on a remote machine or using a different port to receive the auth code: `facebook-cli login --host \u003chostname-or-ip\u003e --port \u003cport\u003e`)\n- Open the given URL in a web browser, and log into your Facebook account if prompted\n- Click \"Continue\" to approve the permissions ([screenshot](doc/images/login-procedure/approve-permissions.png))\n- Select the scope of your audience for any posts you publish using this application ([screenshot](doc/images/login-procedure/set-visibility.png)) ([read more](https://www.facebook.com/help/211513702214269))\n- Click \"Ok\" to continue\n  - If you're using Firefox and you get a `SEC_ERROR_REUSED_ISSUER_AND_SERIAL` error, just copy the URL and run `curl -k \u003curl\u003e` in a terminal\n- Close the browser tab ([screenshot](doc/images/login-procedure/facebook-cli-logged-in.png))\n\n## Commands\n\nRunning `facebook-cli` or `facebook-cli help` shows the list of available commands:\n\n```\nCOMMANDS\n    api        - Make a direct Facebook API request\n    config     - Save your Facebook API credentials\n    feed       - List posts on your timeline\n    help       - Shows a list of commands or help for one command\n    likes      - List pages you have 'Liked'\n    links      - Some useful URLs\n    login      - Request Facebook permissions and receive an API access token\n    logout     - Deauthorize your access token\n    me         - Show your profile information\n    photos     - List photos you have uploaded\n    photosof   - List photos you are tagged in\n    videos     - List videos you have uploaded\n    videosof   - List videos you are tagged in\n```\n\nRun `facebook-cli help \u003ccommand\u003e` for more details on each command.\n\n## Converting output to HTML\n\nUse a Markdown renderer to easily convert the output to an HTML document.  For example, using [Pandoc](http://pandoc.org):\n\n```\nfacebook-cli likes | pandoc -s -f markdown_github \u003e likes.html\n```\n\nSee: [example](https://specious.github.io/facebook-cli/likes.html)\n\n## Things created with facebook-cli\n\n- [Facebook Friends](https://github.com/specious/facebook-friends/) - Build a page that lets you click your friends' profile pictures to jump to their timelines\n\n  \u003ca href=\"https://specious.github.io/facebook-friends/\"\u003e\u003cimg src=\"https://github.com/specious/facebook-friends/raw/master/screenshot.png\" width=\"400\"\u003e\u003c/a\u003e\n\n- [Facebook Browser](https://github.com/specious/facebook-browser/) - Build a searchable index of all the Facebook pages you follow\n\n  \u003ca href=\"https://specious.github.io/facebook-browser/\"\u003e\u003cimg src=\"https://github.com/specious/facebook-browser/raw/master/screenshot.png\" width=\"400\"\u003e\u003c/a\u003e\n\n- [Screensaver](https://twitter.com/tknomad/status/815828633231257600) that prints the titles of all of your 'Liked' Facebook pages, made by using the output of `facebook-cli likes | awk 'NR % 3 == 1' | perl -p -e \"s/\\n/ - /\"` as the text input to the [Phosphor](https://www.youtube.com/watch?v=G6ZWTrl7pV0) screensaver\n\n  \u003ca href=\"https://twitter.com/tknomad/status/815828633231257600\"\u003e\u003cimg src=\"https://pbs.twimg.com/media/C1JnVlpXEAQurZW.jpg\" width=\"400\"\u003e\u003c/a\u003e\n\n## Why can't I...?\n\nFacebook has removed a large portion of their Graph API starting with version 2.0. [Niraj Shah](https://github.com/niraj-shah) has done a fantastic job documenting the cutbacks and their implications in these blog posts:\n\n* [Facebook API: Graph API v2.4 Released, Removes Groups, Notifications and Stream Permissions](https://www.webniraj.com/2015/07/14/facebook-api-graph-api-v2-4-released-removes-groups-notifications-and-stream-permissions/)\n* [Facebook Announces Graph API v2.3, More Deprecations](https://www.webniraj.com/2015/03/26/facebook-announces-graph-api-v2-3-more-deprecations/)\n* [Facebook API: Getting Friends Using Graph API 2.0 and PHP SDK 4.0.x](https://www.webniraj.com/2014/06/12/facebook-api-getting-friends-using-graph-api-2-0-and-php-sdk-4-0-x/)\n\nAn [article](https://developers.facebook.com/blog/post/2012/10/10/growing-quality-apps-with-open-graph/) published in October, 2012 by Facebook developer [Henry Zhang](https://www.facebook.com/hzz) provides insight into the reasoning:\n\n\u003e Post to friends wall via the API generate a high levels of negative user feedback, including “Hides” and “Mark as Spam\" and so we are removing it from the API. If you want to allow people to post to their friend’s timeline from your app, you can invoke the feed dialog.\n\nMore recent changes [outlined](https://developers.facebook.com/docs/graph-api/changelog/breaking-changes) on Facebook's developer portal cover further massive deprecations enactedin 2018, which have eliminated facebook-cli's ability to access past and upcoming events, publish content and retrieve names of taggable friends, as was still possible with the previous long-standing restriction.  facebook-cli's available functions have been pruned to reflect the latest changes.\n\nThe functionality removed renders it impossible to build a full-featured interface to Facebook through the Graph API alone.\n\nIf you expand the functionality of facebook-cli in any way, please [open a pull request](https://github.com/specious/facebook-cli/pulls).\n\n## Development\n\nClone this repository, then use [Bundler](http://bundler.io) to install Ruby dependencies:\n\n```\ngem install bundler\nbundle install\n```\n\nYou should now be able to run *facebook-cli* from the `bin` directory:\n\n```\nbundle exec bin/facebook-cli\n```\n\n*facebook-cli* depends on the [Koala](https://github.com/arsduo/koala) library for interfacing with Facebook's Graph API and [GLI](https://github.com/davetron5000/gli) for parsing command line arguments.\n\nUsing a ruby environment manager such as [rbenv](https://github.com/rbenv/rbenv) or [rvm](https://rvm.io) is advisable to avoid environment conflicts between projects.\n\nIf you'd like to contribute, please take a brief look at the [guide](CONTRIBUTING.md).\n\n## Other Facebook client software in the open source community\n\nApplications:\n\n- [vhpoet/facebook-cli](https://github.com/vhpoet/facebook-cli) (Facebook CLI written in NodeJS)\n- [fb-messenger-cli](https://github.com/Alex-Rose/fb-messenger-cli) (Facebook Messenger for the terminal)\n- [Caprine](https://github.com/sindresorhus/caprine) (Facebook Messenger standalone GUI)\n- [Messenger for Desktop](https://github.com/Aluxian/Messenger-for-Desktop) (Facebook Messenger standalone GUI - currently unmaintained)\n\nLibraries:\n\n- [Koala](https://github.com/arsduo/koala/) (Ruby)\n- [facebook-node-sdk](https://github.com/node-facebook/facebook-node-sdk) (JavaScript)\n\n## License\n\nISC\n","funding_links":[],"categories":["Applications","Entertainment","Ruby","Social media","Tools","facebook"],"sub_categories":["Directory Navigation","Social Media","Facebook","Ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecious%2Ffacebook-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspecious%2Ffacebook-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecious%2Ffacebook-cli/lists"}