jeudi 26 février 2015

Facebook Android SDK returns always an error in response (SSLHandshakeException)

I have an app with a login process, that the user can complete with his Facebook account. The app only requires permissions to read the user's public profile. I've setup the Facebook SDK version 3.23.0 in Android Studio. The login process runs perfectly, and the app has an open active Session with its right token, but whenever I try a newMeRequest, the response always returns the following error:


javax.net.ssl.SSLHandshakeException: java.lang.ClassCastException: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey cannot be cast to java.security.interfaces.RSAPublicKey


This is the source code of my request:



com.facebook.Request request = com.facebook.Request.newMeRequest(session, new com.facebook.Request.GraphUserCallback()
{
@Override
public void onCompleted(GraphUser user, com.facebook.Response response)
{
// If the response is successful
if (session == Session.getActiveSession())
{
if (user != null)
{
// do some things ...
}
}
if (response.getError() != null)
{
// handle errors
}
}
});
request.executeAsync();


I've checked the request's URL in a browser and it works. I don't have a clue about what's happening in the object Response. Any help would be truly appreciated.


Thanks in advance, kind regards


Aucun commentaire:

Enregistrer un commentaire