Closed mbarwick83 closed 8 years ago
There are two steps.
$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
$accessToken = $twitter->oauth2('oauth2/token', array('grant_type' => 'client_credentials'));
$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, null, $accessToken->access_token);
$result = $twitter->get('statuses/user_timeline', array('screen_name' => 'twitterapi'));
Do you have an example for using setting/using an application-only bearer token? I looked at your test php file, but couldn't get a full grasp of it. Or maybe this is not possible with this library?