Closed GoogleCodeExporter closed 9 years ago
It is working fine at our end.
We have to change our demo with new version 4.5.
Please make sure you are using 4.5 version and opensource.brickred,com keys.
If you are still facing the issue please attach log details.
Original comment by tarun.na...@3pillarglobal.com
on 25 Apr 2014 at 10:17
I'm using ver 4.5 and i didn't change keys for twitter.
After redirect to twitter login page, login success, when redirect back, i got
oauth_token and oauth_verifier parameter.
Here is the code to get i use:
SocialAuthManager manager = (SocialAuthManager)
request.getSession().getAttribute("authManager");
Map<String, String> singleInstanceParams =
SocialAuthUtil.getRequestParametersMap(request);
Profile p = null;
try {
AuthProvider provider = manager.connect(singleInstanceParams);
p = provider.verifyResponse(singleInstanceParams);
validatedId = provider.getUserProfile().getValidatedId();
} catch (Exception e) {
e.printStackTrace();
}
This code working fine for google atleast. But with twitter, here is the error
log.
Could you tell me which is wrong here ?
Thank you
Original comment by unli...@gmail.com
on 5 May 2014 at 2:41
Attachments:
Just do following
Profile p = null;
try {
AuthProvider provider = manager.connect(singleInstanceParams);
validatedId = provider.getUserProfile().getValidatedId();
} catch (Exception e) {
e.printStackTrace();
}
Original comment by tarun.na...@3pillarglobal.com
on 15 May 2014 at 4:27
Erh you only delete the line code which use to get profile?
Well since Twitter didn't response with profile info, i think that line won't
work anyway. But then for Twitter, how to get profile info using SocialAuth ?
Normally i would need to send another request to get profile info using the
token i get from the first response right ?
Original comment by mame...@gmail.com
on 23 May 2014 at 8:45
Following should work for getting profile but I am assuming you have done the
first step of authentication.
Profile p = null;
try {
AuthProvider provider = manager.connect(singleInstanceParams);
p = provider.getUserProfile();
} catch (Exception e) {
e.printStackTrace();
}
Original comment by tarun.na...@3pillarglobal.com
on 5 Jun 2014 at 1:50
Please open a new one if you are still facing the issue.
Original comment by tarun.na...@3pillarglobal.com
on 2 Jul 2014 at 8:02
Original issue reported on code.google.com by
unli...@gmail.com
on 14 Apr 2014 at 3:11