File tree Expand file tree Collapse file tree 10 files changed +11
-2
lines changed Expand file tree Collapse file tree 10 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Config
23
23
/** @var int Delay in seconds before we retry the request */
24
24
protected $ retriesDelay = 1 ;
25
25
/** @var string Version of the Twitter API requests should target */
26
- protected $ apiVersion = '1.1 ' ;
26
+ protected $ apiVersion = '2 ' ;
27
27
28
28
/**
29
29
* Decode JSON Response as associative Array
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
@@ -39,6 +40,7 @@ public function testBuildClient()
39
40
public function testSetOauthToken ()
40
41
{
41
42
$ twitter = new TwitterOAuth (CONSUMER_KEY , CONSUMER_SECRET );
43
+ $ twitter ->setApiVersion ('1.1 ' );
42
44
$ twitter ->setOauthToken (ACCESS_TOKEN , ACCESS_TOKEN_SECRET );
43
45
$ this ->assertObjectHasAttribute ('consumer ' , $ twitter );
44
46
$ this ->assertObjectHasAttribute ('token ' , $ twitter );
@@ -76,6 +78,7 @@ public function testOauth2BearerToken($accessToken)
76
78
null ,
77
79
$ accessToken ->access_token ,
78
80
);
81
+ $ twitter ->setApiVersion ('1.1 ' );
79
82
$ result = $ twitter ->get ('statuses/user_timeline ' , [
80
83
'screen_name ' => 'twitterapi ' ,
81
84
]);
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function setUp(): void
24
24
ACCESS_TOKEN ,
25
25
ACCESS_TOKEN_SECRET ,
26
26
);
27
+ $ this ->twitter ->setApiVersion ('1.1 ' );
27
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
28
29
}
29
30
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ protected function setUp(): void
26
26
ACCESS_TOKEN_SECRET ,
27
27
);
28
28
$ this ->userId = explode ('- ' , ACCESS_TOKEN )[0 ];
29
- $ this ->twitter ->setApiVersion ('2 ' );
30
29
}
31
30
32
31
/**
You can’t perform that action at this time.
0 commit comments