0

ユーザーが私をフォローしていることがわかったときに、DIV を変更しようとしています。アラートを発生させるコードを取得できません。
フォローボタンは表示されますが、クリックしてフォローしても何も起こりません。

twttr.anywhere(function (T) {
    T("#followplaceholder").followButton('twitterapi');
    function follow(){
        T.currentUser.isFollowing('twitterapi'), function(e){
            if (e == true){
                alert("following");
            } else {
                 alert("not following");
            }
        }; 
    }                                                             
});

どんな助けでも素晴らしいでしょう!


これが私が今使用しようとしているコードです。関数を起動するには、どこで関数を呼び出しますか? それとも、関数部分を削除する必要がありますか?

twttr.anywhere(function (T) {
    T("#followplaceholder").followButton('twitterapi');
    function follow(){
        T.currentUser.isFollowing('twitterapi'), function(e){
            if (e == true){
                alert("following");
            } else {
                 alert("not following");
            }
        }; 
    }                                                             
});
4

3 に答える 3

1

「twitterapi」の後に余分な)があります

これを試して:

function follow(){
    T.currentUser.isFollowing('twitterapi', function(e){
        if (e == true){
            alert("following");
        } else {
            alert("not following");
        }
    }; 
}
于 2012-07-06T11:39:38.460 に答える
0

Is the follow funcion even triggered? It's just standing there doing nothing? And like the others sad there is a piece of PHP inthere..., it has to be a ) i think.

Also watch your console log for errors.

于 2010-11-09T19:46:50.040 に答える
0

T.currentUser.isFollowing('tweetapi']?>', function(e){

単純なバグ。 はphpコードなので、代わりに?>使用することをお勧めします)]?>

于 2010-11-09T20:37:41.420 に答える