Socialauth Restlet verification code is null for facebook auth

220 views
Skip to first unread message

Electron

unread,
Jan 3, 2014, 6:12:50 AM1/3/14
to socialau...@googlegroups.com
Hello,

I search a solution for this stacktrace

[2014-01-03 12:06:44,668][ERROR][EntrypointRestlet] Verification code is null
org.brickred.socialauth.exception.SocialAuthException: Verification code is null
at org.brickred.socialauth.oauthstrategy.OAuth2.verifyResponse(OAuth2.java:136) ~[na:na]
at org.brickred.socialauth.oauthstrategy.OAuth2.verifyResponse(OAuth2.java:102) ~[na:na]
at org.brickred.socialauth.provider.FacebookImpl.doVerifyResponse(FacebookImpl.java:188) ~[na:na]
at org.brickred.socialauth.provider.FacebookImpl.verifyResponse(FacebookImpl.java:178) ~[na:na]
at org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:184) ~[na:na]

I print out my configuration and see all data i need

                        Map<String,String> map = new HashMap<String,String>();
ObjectMapper mapper = new ObjectMapper();
map = mapper.readValue(entity.getText(), 
   new TypeReference<HashMap<String,String>>(){});
System.out.println(map);
System.out.println(map.size());
System.out.println(manager.getSocialAuthConfig().getApplicationProperties().get("graph.facebook.com.consumer_key"));
System.out.println(manager.getSocialAuthConfig().getApplicationProperties().get("graph.facebook.com.consumer_secret"));
AuthProvider provider = manager.connect(map);
Profile p = provider.getUserProfile();
System.out.println(p.getFirstName());
System.out.println(p.getCountry());
System.out.println(p.getDisplayName());
System.out.println(p.getEmail());
System.out.println(p.getGender());
System.out.println(p.getProfileImageURL()); 

I don't understand what's. I find some topic who doesn't help me, sometimes they said to update socialauth jar, but i've the last one (4.3)
I working with my standalone Restlet server and don't using specific other jar.

Thanks for your help

Tarun Nagpal

unread,
Jan 3, 2014, 6:43:24 AM1/3/14
to socialau...@googlegroups.com

Please make sure you are using the same domain to run your application which are you using to register your application on facebook to get client key and secret.

Please go through the following link to know how to run your application on localhost

https://github.com/3pillarlabs/socialauth/wiki/How-to-run-application-with-Localhost-on-windows


Electron

unread,
Jan 3, 2014, 7:25:25 AM1/3/14
to socialau...@googlegroups.com
Thanks for you response.

I already work with a modified host file. I work on domain http://dev.zest.com/

And Website with Facebook Login and App Domains  are set respectively to http://dev.zest.com/ and dev.zest.com

I have set my properties file with the key/secret and check my SocialAuthConfig get it.

Electron

unread,
Jan 9, 2014, 11:02:23 AM1/9/14
to socialau...@googlegroups.com
I find the problem, it's only me don't understand how work your librarie.
I don't send correct data to the entrypoint. Now it's work for googleplus and facebook but I have a 401 token error for Twitter. Maybe Twitter have a specific other thing to do?
Sorry and thanks for your help.
Reply all
Reply to author
Forward
0 new messages