Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook login for business with configuration ID #716

Open
ChetanTechnource opened this issue Sep 19, 2024 · 2 comments
Open

Facebook login for business with configuration ID #716

ChetanTechnource opened this issue Sep 19, 2024 · 2 comments

Comments

@ChetanTechnource
Copy link

Socialite Version

5.16

Laravel Version

11.9

PHP Version

8.3.11

Database Driver & Version

Mysql 8.0

Description

My facebook app has been upgraded to use facebook login for business.
When I am trying to login, I am receiving following error :

It looks like this app isn't available
To fix this, please contact *APP NAME*.
public function redirectToFacebook(): RedirectResponse
{
        return Socialite::driver('facebook')->usingGraphVersion(config('services.facebook.version'))->redirect();
}

It would be nice to have method similar to usingGraphVersion i.e usingConfigIdForBusinessLogin(config('services.facebook.configuration_id'))

Steps To Reproduce

You should be able to reproduce if you are using facebook login for business.

Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@ev-gor
Copy link

ev-gor commented Sep 19, 2024

According to Facebook's official documentation, you need to add your configuration ID as an optional parameter. So try this and let us know the result

public function redirectToFacebook(): RedirectResponse
{
        return Socialite::driver('facebook')
        ->usingGraphVersion(config('services.facebook.version'))
        ->with(['config_id' => config('services.facebook.configuration_id')])
        ->redirect();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants