Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
@@ -86,16 +86,15 @@ class _Facebook extends LoginAbstract
|
||||
{
|
||||
throw new \IPS\Login\Exception( 'CSRF_FAIL', \IPS\Login\Exception::INTERNAL_ERROR );
|
||||
}
|
||||
|
||||
/* Get a token */
|
||||
try
|
||||
{
|
||||
$response = \IPS\Http\Url::external( "https://graph.facebook.com/oauth/access_token" )->request()->post( array(
|
||||
$response = \IPS\Http\Url::external( "https://graph.facebook.com/v2.8/oauth/access_token" )->request()->post( array(
|
||||
'client_id' => $this->settings['app_id'],
|
||||
'redirect_uri' => (string) \IPS\Http\Url::internal( 'applications/core/interface/facebook/auth.php', 'none', NULL, array(), \IPS\Settings::i()->logins_over_https ? \IPS\Http\Url::PROTOCOL_HTTPS : 0 ),
|
||||
'client_secret' => $this->settings['app_secret'],
|
||||
'code' => \IPS\Request::i()->code
|
||||
) )->decodeQueryString('access_token');
|
||||
) )->decodeJson();
|
||||
}
|
||||
catch( \RuntimeException $e )
|
||||
{
|
||||
@@ -105,12 +104,12 @@ class _Facebook extends LoginAbstract
|
||||
/* Now exchange it for a one that will last a bit longer in case the user wants to use syncing */
|
||||
try
|
||||
{
|
||||
$response = \IPS\Http\Url::external( "https://graph.facebook.com/oauth/access_token" )->request()->post( array(
|
||||
$response = \IPS\Http\Url::external( "https://graph.facebook.com/v2.8/oauth/access_token" )->request()->post( array(
|
||||
'grant_type' => 'fb_exchange_token',
|
||||
'client_id' => $this->settings['app_id'],
|
||||
'client_secret' => $this->settings['app_secret'],
|
||||
'fb_exchange_token' => $response['access_token']
|
||||
) )->decodeQueryString('access_token');
|
||||
) )->decodeJson();
|
||||
}
|
||||
catch( \RuntimeException $e )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user