所以我从facebook上得到了这张图片,我想调整它的大小,如果可能的话,把它变成JPG。
问题:我没有正确的图像URL (我想),现在我正在使用:
graph.facebook.com/" + json["id"] + "/picture" 这将为我提供图像的链接,而不是.jpg会话的链接?‘
因此,当我尝试在此Image url上使用ImageResize时,它无法识别该URL。据我所知..。你知道怎么才能弄到ImageURL吗?谢谢。
发布于 2013-12-03 16:54:07
实际上我所做的是:
public static string GetPictureUrl(string faceBookId)
{
WebResponse response = null;
string pictureUrl = string.Empty;
try
{
WebRequest request = WebRequest.Create(string.Format("https://graph.facebook.com/{0}/picture?width=320&height=320", faceBookId));
response = request.GetResponse();
pictureUrl = response.ResponseUri.ToString();
}
catch (Exception ex)
{
//? handle
}
finally
{
if (response != null) response.Close();
}
return pictureUrl;
}这让我可以检索图像的URL :)!
https://stackoverflow.com/questions/20330182
复制相似问题