| Issue 26: | 一個 get_plurks 的問題 | |
| 2 people starred this issue and may be notified of changes. | Back to list |
你好! 我執行這個 print_r($plurk->get_plurks()); 都傳回stdClass Object ( [plurk_users] => stdClass Object ( ) [plurks] => Array ( ) ) 資料是空的。 但用其他函數,例如 print_r($plurk->get_unread_plurks()); 或是 print_r($plurk->get_plurk(9999999)->plurk->content); 都有資料傳回 請問有怎樣的可能是我疏忽的。 我的 API 已更新為 1.6.2 我的PHP 是 5.2.13
Dec 8, 2010
#1
howar31
Dec 8, 2010
$offset = array_shift(explode("+", date("c", $offset)));;
I deleted the "c" in date() then I got data currectly.
Was that only a mistype?
Dec 9, 2010
後來我修改 plurk_api.php 在 function get_plurks 中加入 if( ! isset($offset)) $offset = time(); 若無指定則給他初始值 這應該是 plurk_api.php 的 BUG
Dec 23, 2010
offset = array_shift(explode("+", date("c", $offset)));;
這一段刪除"c"有用,我用這個就順利執行了!
Jan 10, 2011
那個 "c" 會出錯是因為 $offset = NULL 時會被 PHP 當成 1970 年 01 月 01 日 拿掉的話會變成送出空字串給 Plurk API 所以噗浪就自動把最新的噗吐回來了,但這樣改以後會無法設定 $offset 建議改成當 $offset 沒設定時直接送 NULL 給 Plurk API 或者改用 $plurk->get_plurks(time()) 即可不需更動程式 =)
Jan 18, 2011
請問最近我用此api理的function出現Bad Request function arguments invalid. 會不會是plurk改版造成的?
Mar 11, 2011
感謝回報此問題,已經修正,麻煩重新 checkout code
Status:
Fixed
Owner: appleboy.tw Cc: limit.tsai |