I have a problem now
when a user clicks on a link and goes to the login window, I will add his previous address, such as
https://ha.xyz.com/signin?request=https://ha.xyz.com/products/121111
and then log in to the noodle shop, which will allow the user to choose whether to log in or EMAIL login
, so the click on the link will be
https://www.facebook.com/v3.0/dialog/oauth?client_id=xxx&state=aaa&response_type=code&sdk=php-sdk-5.6.2&redirect_uri=https%3A%2F%2Fha.xyz.com%2F%2Fvendor%2Fsdk%2Ffacebook%2Flogin-callback.php&scope=email
the generation of this connection is the oauth of facebook
require_once "/vendor/autoload.php";
$fb = new Facebook\Facebook([
"app_id" => "xxx",
"app_secret" => "aaa",
"default_graph_version" => "v3.0",
]);
$helper = $fb->getRedirectLoginHelper();
$permissions = ["email"];
$loginUrl = $helper->getLoginUrl("".$host_url."/vendor/sdk/facebook/login-callback.php", $permissions);
the question is how can I give him request
?
he $loginUrl
generates an address structure that cannot be plugged into
at all, and the existence of $_ GET ["request"]
can be determined only after login-callback.php
authentication is successful!