- Is sammyk/laravel-facebook-sdk still maintained and safe to use in a new Laravel app?
- No. The repository is archived and it wraps facebook/graph-sdk v5, which is also archived upstream. It targets Laravel 5.x and Lumen 5.x only, so it is not a safe choice for new applications. For modern Laravel, use Laravel Socialite for the OAuth handshake and the Http facade or Guzzle for Graph API calls.
- Which Laravel and PHP versions does sammyk/laravel-facebook-sdk support?
- The package is compatible with Laravel 5.0 through 5.8 and Lumen 5.x only. It is constrained by facebook/graph-sdk v5 and the PHP 5.x/7.x era, and it is not compatible with Laravel 6+ or PHP 8.x. If your application is on a modern Laravel version, replacement is the correct path rather than integration.
- How do I install and configure sammyk/laravel-facebook-sdk in Laravel?
- For an existing Laravel 5.x app, install it with Composer, register the service provider, publish the configuration file, and set your Facebook app ID and secret. The package also provides a Facebook facade and container binding for login URLs, token exchange, and Graph calls. This is mechanically easy, but it only makes sense for legacy Laravel 5.x projects that already depend on the old SDK.
- Why do my Facebook Graph API calls fail even though the package installed successfully?
- The upstream facebook/graph-sdk pins Graph API versions from the v2.x and v3.x era. Facebook has retired those API versions, so live requests can return version-deprecation or unsupported-version errors even when the PHP code runs. Installation working does not mean the Facebook integration is functional. Expect failures at the first live Graph API call.
- Can I use sammyk/laravel-facebook-sdk with Laravel 8, 9, 10, or 11?
- No. The package targets Laravel 5.x and Lumen 5.x exclusively, and its facebook/graph-sdk dependency blocks PHP 8.x adoption. There is no supported integration path for modern Laravel versions. Use Laravel Socialite plus direct HTTP calls for current Facebook OAuth and Graph API work.
- What is the recommended alternative to sammyk/laravel-facebook-sdk for modern Laravel?
- Use Laravel Socialite for the Facebook OAuth handshake and the Http facade or Guzzle for Graph API requests. This keeps dependencies current and avoids a facade-heavy static coupling pattern. If Facebook login is a primary auth path, implement it directly against current Facebook API versions and test the flow against live behavior.
- How does the Facebook facade and dependency injection work in this package?
- The service provider binds a Facebook client into the Laravel container, and the Facebook facade gives static access to helpers for login URLs, token exchange, and Graph calls. You can inject the underlying client where you want testability, but the facade pattern encourages static coupling at call sites. That coupling is one reason removal or replacement becomes expensive later.
- How do I test Facebook login or Graph API code built with this package?
- Unit test your application code around the injected client or wrapper, and mock the Facebook SDK rather than making live Graph calls. The package describes itself as fully unit tested, but that does not fix retired upstream API versions or archived dependencies. End-to-end tests against live Facebook are unreliable for this legacy stack.
- What are the security and maintenance risks of using this package in production?
- The package is archived, its transitive SDK is archived, and there is no upstream security patch or CVE response path. OAuth and long-lived token patterns from that era may not meet current Facebook or security-review guidance, and Graph API changes can break authentication flows. The MIT license allows forking, but that means you take ownership of security and API drift.
- Can I fork sammyk/laravel-facebook-sdk or update it for PHP 8 and newer Graph API versions?
- The MIT license permits forking, but you would need to replace or upgrade facebook/graph-sdk and rewrite token handling and Graph calls for current API versions. In most cases that work is larger than adopting Socialite plus the Http facade. Treat a fork as a full maintenance commitment, not a quick compatibility patch.