File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Upgrading from v4.x? Facebook PHP SDK v5.x introduced breaking changes. Please [
28
28
Simple GET example of a user's profile.
29
29
30
30
``` php
31
- $fb = new Facebook([
31
+ $fb = new \Facebook\ Facebook([
32
32
'app_id' => '{app-id}',
33
33
'app_secret' => '{app-secret}',
34
34
'default_graph_version' => 'v2.6',
@@ -42,14 +42,14 @@ $fb = new Facebook([
42
42
// $helper = $fb->getPageTabHelper();
43
43
44
44
try {
45
- // Get the Facebook\GraphNodes\GraphUser object for the current user.
45
+ // Get the \ Facebook\GraphNodes\GraphUser object for the current user.
46
46
// If you provided a 'default_access_token', the '{access-token}' is optional.
47
47
$response = $fb->get('/me', '{access-token}');
48
- } catch(Facebook\Exceptions\FacebookResponseException $e) {
48
+ } catch(\ Facebook\Exceptions\FacebookResponseException $e) {
49
49
// When Graph returns an error
50
50
echo 'Graph returned an error: ' . $e->getMessage();
51
51
exit;
52
- } catch(Facebook\Exceptions\FacebookSDKException $e) {
52
+ } catch(\ Facebook\Exceptions\FacebookSDKException $e) {
53
53
// When validation fails or other local issues
54
54
echo 'Facebook SDK returned an error: ' . $e->getMessage();
55
55
exit;
You can’t perform that action at this time.
0 commit comments