facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.96k forks source link

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings. #1050

Closed iamkarthick closed 5 years ago

iamkarthick commented 6 years ago

We've had implement and working the social login 2 days back. But today have the issues

"Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."

We've checked the app settings for Login, and all of our callback URLs are still there and correct.

These errors started today (2018-08-29 20:00 UTC).

Solutions:

After along research, the problem got fixed.

Please use the PHP SDK 5.6.2. And edit the following files in the FacebookRedirectLoginHelper.

Edit in PHP SDK Find file: facebook\graph-sdk\src\Facebook\Helpers\FacebookRedirectLoginHelper.php

Find word $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state','code']); Change to $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state','code','enforce_https']);

gianpaolodn commented 6 years ago

duplicate: #1049

LifullPrasetyama commented 6 years ago

good job, saved my life

vanloc0301 commented 6 years ago

Thanks man.

mihirverma commented 6 years ago

i still have error please give me the solution

Graph returned an error: Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings.

yguedidi commented 5 years ago

closing as duplicate of #1049