-
-
Save nextend/012ca54957e27dbea952fc42195fb0d1 to your computer and use it in GitHub Desktop.
Get social ID by providerID and access token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$providerID = 'facebook'; | |
if (NextendSocialLogin::isProviderEnabled($providerID)) { | |
$provider = NextendSocialLogin::$enabledProviders[$providerID]; | |
try { | |
$socialID = $provider->findSocialIDByAccessToken($accessToken); | |
} catch (Exception $e) { | |
} | |
} | |
if (NextendSocialLogin::isProviderEnabled($providerID)) { | |
$provider = NextendSocialLogin::$enabledProviders[$providerID]; | |
$provider->linkUserToProviderIdentifier($wordpress_user_id, $socialID); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment