2013-10-03 45 views
1

我正在使用Hello.js來訪問/發佈社交網絡數據。 Hello.JS標準化了對通用API的路徑和響應。這個問題特別是關於張貼到twitter。使用hello.js無法在twiiter上發佈

twitter demo page上,我用按鈕登錄並在firebug控制檯中嘗試了hello.api。我能夠得到響應

>>> hello.api('/me',function(resp) {console.log(resp);}) 

並且能夠在控制檯中看到響應對象。 雖然 '/ ME /股' 似乎並沒有工作,這裏是CMD

>>> hello.api('/me/share','post',{message:'Hi to all'}, 
    function(resp) { 
    console.log(resp); 
    }) 

以上reques的響應

{"errors":[{"code":170,"message":"Missing required parameter: status"}]} 

,而我在郵報數據看作爲

status=Hi%20to%20all 

而params是

access_token 1690287512-eB8IocvynmqSmnMlpxoh0VBJxWhff86sYHTBqKo:[email protected]g 
path https://api.twitter.com/1.1/statuses/update.json?include_entities=1 

Hello.js使用auth-server進行服務器端OAuth身份驗證和授權。而且auth-server是implimentation的node-oauth-shim

任何暗示什麼可能會出錯?那麼這可能是非常模糊的問題。

所以我的第二個問題是非常具體。在node-oauth-shim中使用proxy來請求twiiter。在proxy.js如果有人可以幫助我如何調試,如果它的數據發送到Twitter與請求與否。在代碼的某個地方,我可以做控制檯日誌什麼請求(與數據)被髮送到Twitter?

回答