2016-12-23 26 views
-1

有沒有一種方法可以從此代碼中獲取更大的圖像?Facebook GRAPH API JSON響應中的大圖像

GraphRequest request = GraphRequest.newGraphPathRequest(
accessToken, 
"/GAMETIMETV/feed", 
new GraphRequest.Callback() { 
@Override 
public void onCompleted(GraphResponse response) { 
    // Insert your code here 
} 
}); 

Bundle parameters = new Bundle(); 
parameters.putString("fields","name,message,created_time,link,attachments{media{image}}"); 
request.setParameters(parameters); 
request.executeAsync(); 

這通常會給我低分辨率的方形圖像,我需要獲得更高的分辨率可能會添加一些參數的請求。

回答

1
String imageurl = "https://graph.facebook.com/" + id + "/picture?type=large"; 

使用此鏈接來獲得圖像

+0

@尼可羅馬基Fanton嘗試用獨立的網絡請求,這個解決方案。 –

+0

沒有其他請求可以嗎? –

+0

你能告訴我你的完整代碼嗎? –