0
我只在訪問令牌不爲空時調用此設置的推文函數。代碼的這部分工作正常,當令牌爲空時,我會收到一個授權屏幕。然而,在這個setTweet函數中,除了第一個警告之外,我沒有收到任何警告,誰能告訴我什麼可能會出錯?codebird問題發佈鳴叫
var Codebird3 = require("codebird");
var cb3 = new Codebird3();
cb3.setConsumerKey('correctTokenHere', 'AndHere');
function setTweet(){
alert('In setTweet function');
var tweet = 'I have just scored '+ globalPts +' points playing Clash of the Classics. Test your knowledge of the classic hits and see if you can beat my score. https://www.facebook.com/ClassicHits4FM/app_199377276878657';
cb3.__call(
"statuses_update",
{"status": tweet },
function (reply) {
alert('In here');
function inspeccionar(obj){
alert('in reply part');
var msg = '';
for (var property in obj){
if (typeof obj[property] == 'function')
{
var inicio = obj[property].toString().indexOf('function');
var fin = obj[property].toString().indexOf(')')+1;
var propertyValue=obj[property].toString().substring(inicio,fin);
msg +=(typeof obj[property])+' '+property+' : '+propertyValue+' ;\n';
}
else if (typeof obj[property] == 'unknown')
{
msg += 'unknown '+property+' : unknown ;\n';
}
else
{
msg +=(typeof obj[property])+' '+property+' : '+obj[property]+' ;\n';
}
}
return msg;
}
alert(inspeccionar(reply));
alert(reply.httpstatus);
if(reply.httpstatus == 200){
alert("Tweet sent!");
twitterBtn.setBackgroundImage('twitterShare_blue.png');
}
else{
alert(reply.errors);
//alert('Connection lost');
}
}
);
//});
}
P.S.奇怪的是,我有幾乎完全相同的功能在另一個JS在這個應用程序,它的工作原理。我正在使用基本上只是用於這些目的的JavaScript的鈦
要140個字符,而不是_any_鳴叫。 – Jublo