@@ -32,9 +32,9 @@ To authenticate your API requests on behalf of a certain Twitter user
32
32
33
33
``` php
34
34
require_once ('codebird.php');
35
- Codebird::setConsumerKey('YOURKEY', 'YOURSECRET'); // static, see 'Using multiple Codebird instances'
35
+ \Codebird\ Codebird::setConsumerKey('YOURKEY', 'YOURSECRET'); // static, see 'Using multiple Codebird instances'
36
36
37
- $cb = Codebird::getInstance();
37
+ $cb = \Codebird\ Codebird::getInstance();
38
38
```
39
39
40
40
You may either set the OAuth token and secret, if you already have them:
@@ -96,7 +96,7 @@ only when you call the ```oauth2/invalidate_token``` method.
96
96
97
97
If you already have your token, tell Codebird to use it:
98
98
``` php
99
- Codebird::setBearerToken('YOURBEARERTOKEN');
99
+ \Codebird\ Codebird::setBearerToken('YOURBEARERTOKEN');
100
100
```
101
101
102
102
For sending an API request with app-only auth, see the ‘Usage examples’ section.
@@ -224,16 +224,16 @@ called a *singleton*.
224
224
Getting the main Codebird object is done like this:
225
225
226
226
``` php
227
- $cb = Codebird::getInstance();
227
+ $cb = \Codebird\ Codebird::getInstance();
228
228
```
229
229
230
230
If you need to run requests to the Twitter API for multiple users at once,
231
231
Codebird supports this as well. Instead of getting the instance like shown above,
232
232
create a new object:
233
233
234
234
``` php
235
- $cb1 = new Codebird;
236
- $cb2 = new Codebird;
235
+ $cb1 = new \Codebird\ Codebird;
236
+ $cb2 = new \Codebird\ Codebird;
237
237
```
238
238
239
239
Please note that your OAuth consumer key and secret is shared within
0 commit comments