[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8553":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":20,"defaultBranch":21,"hasWiki":19,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},8553,"php-graph-sdk","facebookarchive\u002Fphp-graph-sdk","facebookarchive","The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login.  https:\u002F\u002Fdevelopers.facebook.com\u002Fdocs\u002Fphp",null,"PHP",3209,1955,139,0,1,3,31.87,"Other",true,false,"5.x",[],"2026-06-12 02:01:55","# Facebook SDK for PHP (v5)\n\n[![Build Status](https:\u002F\u002Fimg.shields.io\u002Ftravis\u002Ffacebook\u002Fphp-graph-sdk\u002F5.x.svg)](https:\u002F\u002Ftravis-ci.org\u002Ffacebook\u002Fphp-graph-sdk)\n[![Scrutinizer Code Quality](https:\u002F\u002Fscrutinizer-ci.com\u002Fg\u002Ffacebook\u002Fphp-graph-sdk\u002Fbadges\u002Fquality-score.png?b=5.x)](https:\u002F\u002Fscrutinizer-ci.com\u002Fg\u002Ffacebook\u002Fphp-graph-sdk\u002F?branch=5.x)\n[![Latest Stable Version](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLatest%20Stable-5.7.0-blue.svg)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Ffacebook\u002Fgraph-sdk)\n\nThis repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app.\n\n## Installation\n\nThe Facebook PHP SDK can be installed with [Composer](https:\u002F\u002Fgetcomposer.org\u002F). Run this command:\n\n```sh\ncomposer require facebook\u002Fgraph-sdk\n```\n\nPlease be aware, that there are issues when using the Facebook SDK together with [Guzzle](https:\u002F\u002Fgithub.com\u002Fguzzle\u002Fguzzle) 6.x. php-graph-sdk v5.x only works with Guzzle 5.x out of the box. However, [there is a workaround to make it work with Guzzle 6.x](https:\u002F\u002Fwww.sammyk.me\u002Fhow-to-inject-your-own-http-client-in-the-facebook-php-sdk-v5#writing-a-guzzle-6-http-client-implementation-from-scratch).\n\n## Upgrading to v5.x\n\nUpgrading from v4.x? Facebook PHP SDK v5.x introduced breaking changes. Please [read the upgrade guide](https:\u002F\u002Fwww.sammyk.me\u002Fupgrading-the-facebook-php-sdk-from-v4-to-v5) before upgrading.\n\n## Usage\n\n> **Note:** This version of the Facebook SDK for PHP requires PHP 5.4 or greater.\n\nSimple GET example of a user's profile.\n\n```php\nrequire_once __DIR__ . '\u002Fvendor\u002Fautoload.php'; \u002F\u002F change path as needed\n\n$fb = new \\Facebook\\Facebook([\n  'app_id' => '{app-id}',\n  'app_secret' => '{app-secret}',\n  'default_graph_version' => 'v2.10',\n  \u002F\u002F'default_access_token' => '{access-token}', \u002F\u002F optional\n]);\n\n\u002F\u002F Use one of the helper classes to get a Facebook\\Authentication\\AccessToken entity.\n\u002F\u002F   $helper = $fb->getRedirectLoginHelper();\n\u002F\u002F   $helper = $fb->getJavaScriptHelper();\n\u002F\u002F   $helper = $fb->getCanvasHelper();\n\u002F\u002F   $helper = $fb->getPageTabHelper();\n\ntry {\n  \u002F\u002F Get the \\Facebook\\GraphNodes\\GraphUser object for the current user.\n  \u002F\u002F If you provided a 'default_access_token', the '{access-token}' is optional.\n  $response = $fb->get('\u002Fme', '{access-token}');\n} catch(\\Facebook\\Exceptions\\FacebookResponseException $e) {\n  \u002F\u002F When Graph returns an error\n  echo 'Graph returned an error: ' . $e->getMessage();\n  exit;\n} catch(\\Facebook\\Exceptions\\FacebookSDKException $e) {\n  \u002F\u002F When validation fails or other local issues\n  echo 'Facebook SDK returned an error: ' . $e->getMessage();\n  exit;\n}\n\n$me = $response->getGraphUser();\necho 'Logged in as ' . $me->getName();\n```\n\nComplete documentation, installation instructions, and examples are available [here](docs\u002F).\n\n## Tests\n\n1. [Composer](https:\u002F\u002Fgetcomposer.org\u002F) is a prerequisite for running the tests. Install composer globally, then run `composer install` to install required files.\n2. Create a test app on [Facebook Developers](https:\u002F\u002Fdevelopers.facebook.com), then create `tests\u002FFacebookTestCredentials.php` from `tests\u002FFacebookTestCredentials.php.dist` and edit it to add your credentials.\n3. The tests can be executed by running this command from the root directory:\n\n```bash\n$ .\u002Fvendor\u002Fbin\u002Fphpunit\n```\n\nBy default the tests will send live HTTP requests to the Graph API. If you are without an internet connection you can skip these tests by excluding the `integration` group.\n\n```bash\n$ .\u002Fvendor\u002Fbin\u002Fphpunit --exclude-group integration\n```\n\n## Contributing\n\nFor us to accept contributions you will have to first have signed the [Contributor License Agreement](https:\u002F\u002Fdevelopers.facebook.com\u002Fopensource\u002Fcla). Please see [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fphp-graph-sdk\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) for details.\n\n## License\n\nPlease see the [license file](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fphp-graph-sdk\u002Fblob\u002Fmaster\u002FLICENSE) for more information.\n\n## Security Vulnerabilities\n\nIf you have found a security issue, please contact the maintainers directly at [me@sammyk.me](mailto:me@sammyk.me).\n","facebookarchive\u002Fphp-graph-sdk 是一个用于 PHP 应用程序的 Facebook SDK，它提供了对 Graph API 和 Facebook 登录功能的原生接口。该项目支持包括获取用户信息、管理页面和应用等在内的多种核心功能，并且与 PHP 5.4 及以上版本兼容。其主要技术特点在于能够通过 Composer 方便地集成到项目中，并具备良好的异常处理机制来确保应用的健壮性。适用于需要整合 Facebook 社交功能的各种 Web 应用场景，如社交登录、分享内容或访问用户数据等。",2,"2026-06-11 03:18:35","top_language"]