My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 26: 一個 get_plurks 的問題
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  appleboy.tw
Closed:  Mar 2011
Cc:  limit.t...@gmail.com


 
Reported by peace0...@gmail.com, Nov 16, 2010
你好!
我執行這個 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
#2 howar31
$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
#3 peace0...@gmail.com
後來我修改 plurk_api.php 
在 function get_plurks 中加入

if( ! isset($offset)) $offset = time();
若無指定則給他初始值 

這應該是  plurk_api.php 的 BUG
Dec 23, 2010
#4 kslys...@gmail.com
offset = array_shift(explode("+", date("c", $offset)));;
這一段刪除"c"有用,我用這個就順利執行了!
Jan 10, 2011
#5 hit1205...@gmail.com
那個 "c" 會出錯是因為
$offset = NULL 時會被 PHP 當成 1970 年 01 月 01 日
拿掉的話會變成送出空字串給 Plurk API
所以噗浪就自動把最新的噗吐回來了,但這樣改以後會無法設定 $offset

建議改成當 $offset 沒設定時直接送 NULL 給 Plurk API
或者改用 $plurk->get_plurks(time()) 即可不需更動程式 =)
Jan 18, 2011
#6 rhythm...@gmail.com
請問最近我用此api理的function出現Bad Request function arguments invalid.  
會不會是plurk改版造成的?
Mar 11, 2011
Project Member #7 appleboy.tw
感謝回報此問題,已經修正,麻煩重新 checkout code
Status: Fixed
Owner: appleboy.tw
Cc: limit.tsai

Powered by Google Project Hosting