{"id":48661415,"url":"https://github.com/sns-sdks/python-facebook","last_synced_at":"2026-04-10T10:11:36.006Z","repository":{"id":37550351,"uuid":"165629895","full_name":"sns-sdks/python-facebook","owner":"sns-sdks","description":"A simple Python wrapper for facebook graph api :sparkles: :cake: :sparkles: .","archived":false,"fork":false,"pushed_at":"2026-02-10T10:14:41.000Z","size":1791,"stargazers_count":371,"open_issues_count":21,"forks_count":91,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-02-10T15:42:05.201Z","etag":null,"topics":["facebook-api","facebook-graph-api","facebook-sdk","instagram-api","instagram-sdk","python"],"latest_commit_sha":null,"homepage":"https://sns-sdks.github.io/python-facebook/","language":"Python","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/sns-sdks.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-14T09:07:45.000Z","updated_at":"2026-02-10T10:14:24.000Z","dependencies_parsed_at":"2024-06-18T15:34:16.684Z","dependency_job_id":"e191669d-f3e3-4303-b802-73745005a8e7","html_url":"https://github.com/sns-sdks/python-facebook","commit_stats":{"total_commits":545,"total_committers":5,"mean_commits":109.0,"dds":"0.10275229357798166","last_synced_commit":"9b92007c999c526318a3505ef3207170254e4d42"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/sns-sdks/python-facebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sns-sdks","download_url":"https://codeload.github.com/sns-sdks/python-facebook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-facebook/sbom","scorecard":{"id":835133,"data":{"date":"2025-08-11","repo":{"name":"github.com/sns-sdks/python-facebook","commit":"fd1ca019d6b33714040596ffeea8ea3aba24b723"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/15 approved changesets -- score normalized to 1","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":"Maintained","score":2,"reason":"2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Release.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Release.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Test.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Test.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Test.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Test.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Test.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Test.yaml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/Test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/docs.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-facebook/docs.yaml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/Test.yaml:30","Warn: pipCommand not pinned by hash: .github/workflows/Test.yaml:55","Warn: pipCommand not pinned by hash: .github/workflows/docs.yaml:16","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/Release.yaml:1","Warn: no topLevel permission defined: .github/workflows/Test.yaml:1","Warn: no topLevel permission defined: .github/workflows/docs.yaml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 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-23T18:48:18.605Z","repository_id":37550351,"created_at":"2025-08-23T18:48:18.605Z","updated_at":"2025-08-23T18:48:18.605Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"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":["facebook-api","facebook-graph-api","facebook-sdk","instagram-api","instagram-sdk","python"],"created_at":"2026-04-10T10:11:35.407Z","updated_at":"2026-04-10T10:11:36.001Z","avatar_url":"https://github.com/sns-sdks.png","language":"Python","readme":"Python Facebook\n---------------\n\nA Python wrapper for the Facebook \u0026 Instagram Graph APIs.\n\n.. image:: https://github.com/sns-sdks/python-facebook/workflows/Test/badge.svg\n    :target: https://github.com/sns-sdks/python-facebook/actions\n    :alt: Build Status\n\n.. image:: https://img.shields.io/badge/Docs-passing-brightgreen\n    :target: https://sns-sdks.github.io/python-facebook/\n    :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/sns-sdks/python-facebook/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/sns-sdks/python-facebook\n    :alt: Codecov\n\n.. image:: https://img.shields.io/pypi/v/python-facebook-api.svg\n    :target: https://pypi.org/project/python-facebook-api\n    :alt: PyPI\n\n\n============\nIntroduction\n============\n\nWe have refactored this library after `v0.10.0`. If you want to use the old version, please, see branch ``v0``.\n\nThe new structure is as follows\n\n.. image:: docs/docs/images/structure.png\n\n\n.. note::\n\n    This new structure may still change.\n\n    Now, you can use base class ``GraphAPI`` to get data.\n\n==========\nInstalling\n==========\n\nYou can install this library from ``pypi``::\n\n    pip install --upgrade python-facebook-api\n\n.. note::\n\n    If you want to use an old version, you can set the version to ``0.9.*``, which also supports Python 2.7.\n\n=====\nUsage\n=====\n\n--------\nGraphAPI\n--------\n\nYou can use the ``GraphAPI`` class to communicate with the Facebook Graph API.\n\nYou can initialize a ``GraphAPI`` object with three different methods, depending on your needs.\n\n1. If you already have an access token, you can initialize it with ::\n\n    \u003e\u003e\u003e from pyfacebook import GraphAPI\n    \u003e\u003e\u003e api = GraphAPI(access_token=\"token\")\n\n2. If you need to generate an app token automatically using the app/client ID and secret, you can do ::\n\n    \u003e\u003e\u003e from pyfacebook import GraphAPI\n    \u003e\u003e\u003e api = GraphAPI(app_id=\"id\", app_secret=\"secret\", application_only_auth=True)\n\n3. If you want to perform the authorization process for a user, you can do ::\n\n    \u003e\u003e\u003e from pyfacebook import GraphAPI\n    \u003e\u003e\u003e api = GraphAPI(app_id=\"id\", app_secret=\"secret\", oauth_flow=True)\n    \u003e\u003e\u003e api.get_authorization_url()\n    # ('https://www.facebook.com/dialog/oauth?response_type=code\u0026client_id=id\u0026redirect_uri=https%3A%2F%2Flocalhost%2F\u0026scope=public_profile\u0026state=PyFacebook', 'PyFacebook')\n    # let user to do oauth at the browser opened by link.\n    # then get the response url\n    \u003e\u003e\u003e api.exchange_user_access_token(response=\"url redirected\")\n    # Now the api will get the user access token.\n\nFor more info about the different access tokens, see https://developers.facebook.com/docs/facebook-login/guides/access-tokens.\n\nOnce you have the user access token, you can get the Facebook data. For example,\n\n    \u003e\u003e\u003e api.get_object(object_id=\"20531316728\")\n    \u003e\u003e\u003e {'name': 'Facebook App', 'id': '20531316728'}\n\nSee the code for more operations.\n\n-----------\nFacebookAPI\n-----------\n\nTo get the user data::\n\n    \u003e\u003e\u003e fb.user.get_info(user_id=\"413140042878187\")\n    \u003e\u003e\u003e User(id='413140042878187', name='Kun Liu')\n\nTo get the page data::\n\n    \u003e\u003e\u003e fb.page.get_info(page_id=\"20531316728\")\n    \u003e\u003e\u003e Page(id='20531316728', name='Facebook App')\n\nFor more info, please, see the code or the docs.\n\n========\nFeatures\n========\n\nThe library has the following features.\n\nFacebook Graph API:\n\n- Application and Application's edges\n- Page and Page's edges\n- User and User's edges\n- Group and Group's edges\n- Event and Event's edges\n- Server-Sent Events\n\nIG Business Graph API:\n\n- User and User's edges\n- Media and Media's edges\n\nIG Basic Display API:\n\n- User and User's edges\n- Media and Media's edges\n\n=======\nSUPPORT\n=======\n\n``python-facebook-api`` has been developed with Pycharm under the free JetBrains Open Source license(s) granted by JetBrains s.r.o.,\nhence I would like to express my thanks here.\n\n.. image:: docs/docs/images/jetbrains.svg\n    :target: https://www.jetbrains.com/?from=sns-sdks/python-facebook\n    :alt: Jetbrains\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsns-sdks%2Fpython-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsns-sdks%2Fpython-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsns-sdks%2Fpython-facebook/lists"}