[英]How to use codebird.js to search twitter API for matching users?
我真的很想嘗試獲取此Twitter庫( https://github.com/mynetx/codebird-js )以返回搜索結果,而不是用戶時間軸。
我無法找到將搜索參數傳遞給它的位置。
這是我目前的代碼:
var cb = new Codebird();
cb.setConsumerKey("<fill in>","<fill in>");
cb.setToken('<fill in>','<fill in>');
cb.__call('users/search', {
'user' : '<fill in>', // ??
}
);
function tweets_callback (result)
{
// do something with the result
}
但是它總是拋出錯誤,有人知道我該怎么做嗎?
完全沒有記錄! 這是您的操作方式:
var cb = new Codebird();
cb.setConsumerKey("<fill in>","<fill in>");
cb.setToken('<fill in>','<fill in>');
cb.__call('users/search', {
'q' : '<fill in>',
'callback' : 'search_callback',
}
);
function search_callback (result)
{
// do something with the result
}
第5行應為:
cb.__call('users_search', {
此處記錄如下: https : //github.com/jublonet/codebird-js#3-mapping-api-methods-to-codebird-function-calls
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.