{"id":15373805,"url":"https://github.com/boly38/testfb","last_synced_at":"2026-04-18T06:36:57.147Z","repository":{"id":204021735,"uuid":"710927083","full_name":"boly38/testFB","owner":"boly38","description":"Quickstart to post on Facebook (FB) using FB API","archived":false,"fork":false,"pushed_at":"2023-10-28T19:01:06.000Z","size":3,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T21:51:58.040Z","etag":null,"topics":["curl","facebook","facebook-api","hacktoberfest","howto","nodejs","quickstart"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/boly38.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-27T18:39:03.000Z","updated_at":"2023-10-27T19:01:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e540af8b-85ed-4bde-9ceb-0fb5e9a70a35","html_url":"https://github.com/boly38/testFB","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"26be443388341e827d2ba6f61d50d127e6a83a71"},"previous_names":["boly38/testfb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boly38/testFB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2FtestFB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2FtestFB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2FtestFB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2FtestFB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boly38","download_url":"https://codeload.github.com/boly38/testFB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2FtestFB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31959881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["curl","facebook","facebook-api","hacktoberfest","howto","nodejs","quickstart"],"created_at":"2024-10-01T13:56:26.391Z","updated_at":"2026-04-18T06:36:57.125Z","avatar_url":"https://github.com/boly38.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testFB\n\nQuickstart to post on FB using FB API\nhttps://developers.facebook.com/docs#apis-and-sdks\n\n* this project requires a page name + page access token (short or long lived one)\n* this project produces 2 curl commands : get page, and post a simple message on a page\n\nIn addition with an application-id and application-secret, and access token (short or long-lived one) :\n* this project produces a curl command to get or recycle long-lived access token\n\n## HowTo\n\n### requirements\n\n* nodeJS \u0026 curl installed\n\n### context data\n\nYou need a **page name**: \n- pick it from page uri : https://facebook.com/myPageNameHere\n\n````bash\n# page id\nexport FB_PAGE_ID=myPageNameHere\n````\n\nYou need **a valid page access token** :\n- to generate a token, use [tools/explorer](https://developers.facebook.com/tools/explorer).\n- to verify a token, use [tools/debug/accesstoken](https://developers.facebook.com/tools/debug/accesstoken/) : check scope and expiration date.\n\nBy default, a FB login result is a short-lived access-token : expiration is ~1 hour.\n\nTo get long-lived access-token, you must call a dedicated API. Long-lived access-token expiration is ~2 months\n\n````bash\n# page access token\nexport FB_ACCESS_TOKEN=xxxxx\n````\n\nYou could print current FB env values :\n````bash\n# check current env\nenv|grep FB_\n````\n\nor clean them, for example:\n````bash\nunset FB_PAGE_ID FB_ACCESS_TOKEN\n````\n\n(in option) You need an **application id** and **application secret** in order to get long-lived token:\n\n````bash\nexport FB_APP_id=0000000\nexport FB_APP_SECRET=0a0a0a0a0a\n````\nNb: pick them from [developers.facebook.com/apps](https://developers.facebook.com/apps/)\n\n### usage\n````bash\nnode printCurlCommands\n# this app only SHOWS curl commands \n# then it's up to you to copy/paste curl command you want to try\n````\n\n* see more info in [source code](./printCurlCommands.js)\n\n---\nSee also : (failed) [testInsta](https://github.com/boly38/testInsta)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboly38%2Ftestfb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboly38%2Ftestfb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboly38%2Ftestfb/lists"}