[英]How to get the friends contact infromation from android facebook sdk?
[英]how to get friends profile pictures from facebook sdk in android
我正在嘗試通過傳遞URL從Facebook獲取朋友個人資料圖片的列表,但我沒有在以下代碼中嘗試過的個人資料圖片
為了獲取個人資料圖片,我調用了img.setImageBitmap(pick());
public Bitmap pick() {
String imageURL;
URL img_value = null;
Bitmap bitmap = null;
Log.d(TAG, "Loading Picture");
try {
img_value = new URL("http://graph.facebook.com/"+"100007027988491"+"/picture?type=small");
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
bitmap = BitmapFactory.decodeStream(img_value.openConnection().getInputStream());
img.setImageBitmap(bitmap);
} catch (Exception e) {
Log.d("TAG", "Loading Picture FAILED");
// e.printStackTrace();
}
return bitmap;
}
但我沒有照片,請幫助我解決問題
用“ https”替換“ http”,您將獲得個人資料圖片。 https://graph.facebook.com/ “ +” 100007027988491“ +” / picture?type = small
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.