Note that there are some explanatory texts on larger screens.

plurals
  1. POGet user image from Facebook Graph-API
    primarykey
    data
    text
    <p>I want to show the users profile picture in a list view. When I try to call the graph-api from android to retrieve the image, I always get the following error. </p> <pre><code>java.io.IOException: Hostname &lt;fbcdn-profile-a.akamaihd.net&gt; was not verified at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:170) at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection$HttpsEngine.connect(HttpsURLConnection.java:398) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.sendRequest(HttpURLConnection.java:1224) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequestInternal(HttpURLConnection.java:1558) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequest(HttpURLConnection.java:1551) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1052) at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getInputStream(HttpsURLConnection.java:252) at com.facebook.android.Util.openUrl(Util.java:200) at com.facebook.android.Facebook.request(Facebook.java:559) </code></pre> <p>This is the code used by me:</p> <pre><code>private static void retrieveProfilePicture(String userId) throws MalformedURLException, IOException{ facebook = FacebookHelper.getInstance(); Bundle bundle = new Bundle(); bundle.putString(Facebook.TOKEN, facebook.getAccessToken()); Object picture = facebook.request("/"+userId+"/picture", bundle, "GET"); </code></pre> <p>When I do the same call in the browser (https://graph.facebook.com//picture?access_token=), then I get the image returned on a url like this <code>https://fbcdn-profile-a.akamaihd.net/...</code></p> <p>In which format is the image delivered to me? JSON with a ref to image (url)?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload