Completed
Push — master ( 0b31bd...27ce5d )
by Rakesh
06:22 queued 02:47
created
fb-callback.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
 session_start();
10 10
 require_once 'appconfig.php';
11 11
 $fb = new Facebook\Facebook([
12
-  'app_id' => $appId, // variable with Facebook App ID
13
-  'app_secret' => $appSecret,
14
-  'default_graph_version' => 'v3.3',
15
-  ]);
12
+    'app_id' => $appId, // variable with Facebook App ID
13
+    'app_secret' => $appSecret,
14
+    'default_graph_version' => 'v3.3',
15
+    ]);
16 16
 $helper = $fb->getRedirectLoginHelper();
17 17
 try {
18 18
     $accessToken = $helper->getAccessToken();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 $helper = $fb->getRedirectLoginHelper();
17 17
 try {
18 18
     $accessToken = $helper->getAccessToken();
19
-} catch(Facebook\Exceptions\FacebookResponseException $e) {
19
+} catch (Facebook\Exceptions\FacebookResponseException $e) {
20 20
     // When Graph returns an error
21 21
     echo 'Graph returned an error: ' . $e->getMessage();
22 22
     exit;
23
-} catch(Facebook\Exceptions\FacebookSDKException $e) {
23
+} catch (Facebook\Exceptions\FacebookSDKException $e) {
24 24
     // When validation fails or other local issues
25 25
     echo 'Facebook SDK returned an error: ' . $e->getMessage();
26 26
     exit;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 // If you know the user ID this access token belongs to, you can validate it here
53 53
 //$tokenMetadata->validateUserId('123');
54 54
 $tokenMetadata->validateExpiration();
55
-if (! $accessToken->isLongLived()) {
55
+if (!$accessToken->isLongLived()) {
56 56
     // Exchanges a short-lived access token for a long-lived one
57 57
     try {
58 58
     $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
Please login to merge, or discard this patch.