I am creating a twitter social login feature for my Java web application, am using the Scribe library.
Following the library tutorial here for verifying the user credentials, you will be able to retrieve the user credential as json
object.
The retrieved json
object doesn't have the user email, after researching for how to retrieve the email, i found this documentation in twitter api's.
Now, translating the document with the scribe api's didn't work, and still not able to get the email.
I tried all of the following:
OAuthRequest request = new OAuthRequest(Verb.GET, "https://api.twitter.com/1.1/account/verify_credentials.json");
request.addBodyParameter("include_email", "true");
//OR
request.addQuerystringParameter("include_email", "true");
service.signRequest(accessToken, request);
Response response = request.send();
String result = response.getBody();
Any idea how to retrieve the email using scribe will be appreciated.
Regards