I'm building an Android app in which I'm trying to let the user bring in photos from Facebook. After I grab the URLs from a GraphRequest, I'm trying to use Glide to load the image into an ImageButton
but I keep getting the error D/skia: --- skImageDecoder::Factory returned null
. Here's my code:
GraphRequest request = GraphRequest.newMeRequest(
AccessToken.getCurrentAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
try {
String url = object.getJSONObject("photos").getJSONArray("data").getJSONObject(0).getString("link");
Glide.with(UserSettingsActivity.this).load(url).into(userOne);
} catch (Exception e) {
e.printStackTrace();
}
}
});
Bundle parameters = new Bundle();
parameters.putString("fields","id,photos{link}");
request.setParameters(parameters);
request.executeAsync();
EDIT - Sorry, I realized right after posting that I didn't actually ask a question. Does anyone know what the correct way to load Facebook photos is? Thanks!