久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Facebook Graph API 更改:圖片類型(大小)不再有效?

Facebook Graph API Change: Picture type (size) no longer working?(Facebook Graph API 更改:圖片類型(大小)不再有效?)
本文介紹了Facebook Graph API 更改:圖片類型(大小)不再有效?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

根據(jù) Facebook 的 Graph API 文檔(此處),您可以通過 URL 訪問各種尺寸的用戶個人資料圖片,例如:

According to Facebook's Graph API documentation (here), you can access various sizes of a user's profile picture through URLs such as:

https://graph.facebook.com/(userid)/picture?type=small
https://graph.facebook.com/(userid)/picture?type=large

您會注意到第一個解析為以 _t.jpg(小縮略圖)結(jié)尾的 url,第二個以 _n.jpg(大圖像)結(jié)尾.到現(xiàn)在為止還挺好.同樣,我們應(yīng)該能夠像這樣查詢這些圖像:

You'll notice that the first resolves to a url ending in _t.jpg (the small thumbnail) and the second ending in _n.jpg (the large image). So far so good. Equivalently, we should be able to query for these images like this:

https://graph.facebook.com/(userid)?fields=picture&type=small
https://graph.facebook.com/(userid)?fields=picture&type=large

后一種格式按預(yù)期工作了好幾個月,直到幾天前它突然開始完全忽略類型"參數(shù) - 現(xiàn)在一切都解析為以 _q.jpg 結(jié)尾的圖像,如果沒有,這是默認值類型"指定.結(jié)果,我再也找不到在 PHP 中查詢大圖像的方法(我的真正問題).它曾經(jīng)是這樣工作的:

This latter format worked as expected for many months, until just a few days ago when it suddenly started ignoring the "type" parameter entirely - everything now resolves to an image ending in _q.jpg, which is the default if no "type" is specified. As a result, I can no longer figure out a way to query for the large image in PHP (my real problem). It used to work like this:

$pic = $facebook->api('/me', array('fields' => 'picture', 'type' => 'large'));

...但如上所述,類型"已自發(fā)地開始被忽略.我花了幾個小時瀏覽他們的文檔,但找不到任何關(guān)于已更改內(nèi)容的參考,或者應(yīng)該完成的新"方式 - 任何指針都將不勝感激...

...but as described above, "type" has spontaneously started being ignored. I've spent several hours scouring their documentation but haven't been able to find any reference to what has changed, or the "new" way this should be done - any pointers would be hugely appreciated...

以下都不起作用(不返回任何內(nèi)容):

None of the following work, either (returns nothing):

$pic = $facebook->api('/me/picture', array('type' => 'large'));
$pic = $facebook->api('/(my_uid)/picture', array('type' => 'large'));
$pic = $facebook->api('/me/picture/?type=large');
$pic = $facebook->api('/(my_uid)/picture/?type=large');

基本上,由于 Facebook 幾天前出事了,似乎沒有任何方法可以從 PHP 獲取非默認圖片大小.您可以自己從 Graph API Explorer 嘗試一些調(diào)用(here).

Basically, since Facebook broke things a few days ago there doesn't seem to be any way to get a non-default picture size from PHP. You can try out some of the calls yourself from the Graph API Explorer (here).

其他相關(guān)/相關(guān)鏈接:

http://stackoverflow.com/questions/2978761/facebook-graph-api-will-not-give-me-picture-data
http://stackoverflow.com/questions/7718704/requesting-picture-for-event

推薦答案

我找到了一個解決方法 - 仍然可以通過 FQL 查詢訪問各種尺寸的個人資料圖片:

I found a workaround - profile pictures of various sizes can still be accessed via an FQL query:

$pic = $facebook->api(array('method'=>'fql.query', 'query'=>"SELECT pic_big FROM user WHERE uid=$fb_uid"));

(pic_big"相當于type=large" - 請參閱此處).

("pic_big" is equivalent to "type=large" - see here).

這仍然不能解釋為什么 GRAPH 調(diào)用突然中斷,或者為什么圖像大小似乎不再可以通過 Graph 訪問(我仍然想知道)......但至少有一些獲取其他尺寸照片的方法.

This still doesn't explain why the GRAPH call suddenly broke though, or why image sizes don't seem to be accessible via Graph at all anymore (which I'd still like to know)...but at least there's some way to get the other size photos.

必須喜歡 Facebook 及其一流的可靠性...

Gotta love Facebook and their top-notch reliability...

這篇關(guān)于Facebook Graph API 更改:圖片類型(大小)不再有效?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產(chǎn)生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 久久精品国产一区二区三区不卡 | 国产99热精品 | 懂色av一区二区三区在线播放 | 黄色网址在线免费观看 | 亚洲精品视频在线 | 一区免费看 | 久久精品久久久久久 | 爱爱无遮挡 | 狠狠操狠狠操 | 亚洲三区在线观看 | 日韩精品在线网站 | 国产精品一区久久久 | 91精品国产日韩91久久久久久 | 亚洲精品一区二区网址 | 日本成人福利视频 | 成人aaa视频 | 亚洲视频三区 | 特黄视频 | 久久精品免费一区二区 | 亚洲精品欧美精品 | 国产精品免费在线 | 一区二区三区四区电影视频在线观看 | 精品国产一区久久 | 成人免费激情视频 | 成人av免费| 成人久久18免费网站麻豆 | 欧美激情视频一区二区三区在线播放 | 成人精品一区二区户外勾搭野战 | 国产激情视频网 | 国产一区在线视频 | 免费激情| 亚洲日本一区二区三区四区 | 国产在线精品一区二区 | 亚洲视频中文 | 日韩第1页 | 欧美精品久久久久久久久久 | а天堂中文最新一区二区三区 | 波多野结衣电影一区 | 日韩电影免费在线观看中文字幕 | 久久精品这里精品 | 亚洲精品欧美一区二区三区 |