Skip to content

Commit 43af15c

Browse files
authored
Merge pull request facebookarchive#894 from ryanml/sing-namespace-fix
Singularizing the Helpers, GraphNodes, and Exceptions namespaces. (Rebase of facebookarchive#893)
2 parents 844ba94 + 4914a2b commit 43af15c

File tree

112 files changed

+339
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+339
-339
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ $fb = new \Facebook\Facebook([
4444
// $helper = $fb->getPageTabHelper();
4545

4646
try {
47-
// Get the \Facebook\GraphNodes\GraphUser object for the current user.
47+
// Get the \Facebook\GraphNode\GraphUser object for the current user.
4848
// If you provided a 'default_access_token', the '{access-token}' is optional.
4949
$response = $fb->get('/me', '{access-token}');
50-
} catch(\Facebook\Exceptions\FacebookResponseException $e) {
50+
} catch(\Facebook\Exception\FacebookResponseException $e) {
5151
// When Graph returns an error
5252
echo 'Graph returned an error: ' . $e->getMessage();
5353
exit;
54-
} catch(\Facebook\Exceptions\FacebookSDKException $e) {
54+
} catch(\Facebook\Exception\FacebookSDKException $e) {
5555
// When validation fails or other local issues
5656
echo 'Facebook SDK returned an error: ' . $e->getMessage();
5757
exit;

docs/examples/access_token_from_canvas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $helper = $fb->getCanvasHelper();
1717

1818
try {
1919
$accessToken = $helper->getAccessToken();
20-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
20+
} catch(Facebook\Exception\FacebookResponseException $e) {
2121
// When Graph returns an error
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\FacebookSDKException $e) {
2525
// When validation fails or other local issues
2626
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2727
exit;

docs/examples/access_token_from_javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ $helper = $fb->getJavaScriptHelper();
5959

6060
try {
6161
$accessToken = $helper->getAccessToken();
62-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
62+
} catch(Facebook\Exception\FacebookResponseException $e) {
6363
// When Graph returns an error
6464
echo 'Graph returned an error: ' . $e->getMessage();
6565
exit;
66-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
66+
} catch(Facebook\Exception\FacebookSDKException $e) {
6767
// When validation fails or other local issues
6868
echo 'Facebook SDK returned an error: ' . $e->getMessage();
6969
exit;

docs/examples/access_token_from_page_tab.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $helper = $fb->getPageTabHelper();
1717

1818
try {
1919
$accessToken = $helper->getAccessToken();
20-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
20+
} catch(Facebook\Exception\FacebookResponseException $e) {
2121
// When Graph returns an error
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\FacebookSDKException $e) {
2525
// When validation fails or other local issues
2626
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2727
exit;

docs/examples/batch_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ echo '<h1>Make a batch request</h1>' . "\n\n";
5252

5353
try {
5454
$responses = $fb->sendBatchRequest($batch);
55-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
55+
} catch(Facebook\Exception\FacebookResponseException $e) {
5656
// When Graph returns an error
5757
echo 'Graph returned an error: ' . $e->getMessage();
5858
exit;
59-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
59+
} catch(Facebook\Exception\FacebookSDKException $e) {
6060
// When validation fails or other local issues
6161
echo 'Facebook SDK returned an error: ' . $e->getMessage();
6262
exit;
@@ -118,11 +118,11 @@ $batch = [
118118

119119
try {
120120
$responses = $fb->sendBatchRequest($batch);
121-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
121+
} catch(Facebook\Exception\FacebookResponseException $e) {
122122
// When Graph returns an error
123123
echo 'Graph returned an error: ' . $e->getMessage();
124124
exit;
125-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
125+
} catch(Facebook\Exception\FacebookSDKException $e) {
126126
// When validation fails or other local issues
127127
echo 'Facebook SDK returned an error: ' . $e->getMessage();
128128
exit;

docs/examples/batch_upload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ $batch = [
3737

3838
try {
3939
$responses = $fb->sendBatchRequest($batch);
40-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
40+
} catch(Facebook\Exception\FacebookResponseException $e) {
4141
// When Graph returns an error
4242
echo 'Graph returned an error: ' . $e->getMessage();
4343
exit;
44-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
44+
} catch(Facebook\Exception\FacebookSDKException $e) {
4545
// When validation fails or other local issues
4646
echo 'Facebook SDK returned an error: ' . $e->getMessage();
4747
exit;

docs/examples/facebook_login.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ $helper = $fb->getRedirectLoginHelper();
3838

3939
try {
4040
$accessToken = $helper->getAccessToken();
41-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
41+
} catch(Facebook\Exception\FacebookResponseException $e) {
4242
// When Graph returns an error
4343
echo 'Graph returned an error: ' . $e->getMessage();
4444
exit;
45-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
45+
} catch(Facebook\Exception\FacebookSDKException $e) {
4646
// When validation fails or other local issues
4747
echo 'Facebook SDK returned an error: ' . $e->getMessage();
4848
exit;
@@ -84,7 +84,7 @@ if (! $accessToken->isLongLived()) {
8484
// Exchanges a short-lived access token for a long-lived one
8585
try {
8686
$accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
87-
} catch (Facebook\Exceptions\FacebookSDKException $e) {
87+
} catch (Facebook\Exception\FacebookSDKException $e) {
8888
echo "<p>Error getting long-lived access token: " . $e->getMessage() . "</p>\n\n";
8989
exit;
9090
}

docs/examples/pagination_basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ $fb = new Facebook\Facebook([
1818
try {
1919
// Requires the "read_stream" permission
2020
$response = $fb->get('/me/feed?fields=id,message&limit=5');
21-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
21+
} catch(Facebook\Exception\FacebookResponseException $e) {
2222
// When Graph returns an error
2323
echo 'Graph returned an error: ' . $e->getMessage();
2424
exit;
25-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
25+
} catch(Facebook\Exception\FacebookSDKException $e) {
2626
// When validation fails or other local issues
2727
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2828
exit;

docs/examples/post_links.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example covers posting a link to the current user's timeline using the Grap
44

55
It assumes that you've already obtained an access token from one of the helpers found [here](../reference.md). The access token must have the `publish_actions` permission for this to work.
66

7-
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNodes\GraphNode`](../reference/GraphNode.md), [`Facebook\Exceptions\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exceptions\FacebookResponseException`](../reference/FacebookResponseException.md).
7+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNode\GraphNode`](../reference/GraphNode.md), [`Facebook\Exception\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exception\FacebookResponseException`](../reference/FacebookResponseException.md).
88

99
## Example
1010

@@ -23,10 +23,10 @@ $linkData = [
2323
try {
2424
// Returns a `Facebook\FacebookResponse` object
2525
$response = $fb->post('/me/feed', $linkData, '{access-token}');
26-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
26+
} catch(Facebook\Exception\FacebookResponseException $e) {
2727
echo 'Graph returned an error: ' . $e->getMessage();
2828
exit;
29-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
29+
} catch(Facebook\Exception\FacebookSDKException $e) {
3030
echo 'Facebook SDK returned an error: ' . $e->getMessage();
3131
exit;
3232
}

docs/examples/retrieve_user_profile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example covers getting profile information for the current user and printin
44

55
It assumes that you've already obtained an access token from one of the helpers found [here](../reference.md).
66

7-
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNodes\GraphUser`](../reference/GraphNode.md#graphuser-instance-methods), [`Facebook\Exceptions\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exceptions\FacebookResponseException`](../reference/FacebookResponseException.md).
7+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNode\GraphUser`](../reference/GraphNode.md#graphuser-instance-methods), [`Facebook\Exception\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exception\FacebookResponseException`](../reference/FacebookResponseException.md).
88

99
## Example
1010

@@ -18,10 +18,10 @@ $fb = new Facebook\Facebook([
1818
try {
1919
// Returns a `Facebook\FacebookResponse` object
2020
$response = $fb->get('/me?fields=id,name', '{access-token}');
21-
} catch(Facebook\Exceptions\FacebookResponseException $e) {
21+
} catch(Facebook\Exception\FacebookResponseException $e) {
2222
echo 'Graph returned an error: ' . $e->getMessage();
2323
exit;
24-
} catch(Facebook\Exceptions\FacebookSDKException $e) {
24+
} catch(Facebook\Exception\FacebookSDKException $e) {
2525
echo 'Facebook SDK returned an error: ' . $e->getMessage();
2626
exit;
2727
}

0 commit comments

Comments
 (0)