i am new to OAuth
i want to know how to use "Twitter OAuth library from Abraham Wiliam" to get user's credential information.such as screen_name.
Download this library https://github.com/abraham/twitteroauth You need just twitteroauth.php and OAuth.php files. Only twitteroauth.php to include.
Here's the Twitter sample: https://dev.twitter.com/docs/auth/oauth/single-user-with-examples#php
After declaration of getConnectionWithAccessToken() function and $connection variable with your valid app tokens just try code
$user = $connection->get("account/verify_credentials");
print $user->screen_name;
according to this Twitter REST API Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With