1

必要なものを見つけるのに苦労しています。要するに:

私がサイトを持っていて、ユーザーがTwitterハンドルを入力できる場合、@userどうすれば動的にツイートをプルバックできますか?

Twitterを使用すると、独自のウィジェットを作成できますuserが、呼び出しではなく、乱数です。1494028230983

ありがとう

4

1 に答える 1

1

あなたの質問を理解できたら、指定されたユーザー名に従って Twitter からツイートの数を取得するTweet jQuery プラグインを使用することをお勧めします。とても使いやすいです。

$(".tweet").tweet({
    username: username,
    join_text: "auto",
    avatar_size: 32,
    count: 5,
    auto_join_text_default: "we said,", 
    auto_join_text_ed: "we",
    auto_join_text_ing: "we were",
    auto_join_text_reply: "we replied to",
    auto_join_text_url: "we were checking out",
    loading_text: "loading tweets..."
);

class次のように、名前を使用してcssでスタイルを適用できます

li{margin:5px 0;border:solid gray 1px;border-radius:2px;}
li.tweet_odd{ background:#eee;}
li.tweet_even{ background:#f0fff0;}
li a.tweet_avatar{float:left;margin-right:5px;}
li span.tweet_time a{text-decoration:none;color:green}
li span.tweet_text a{text-decoration:none;color:green}
li span.tweet_text{color:#333}​

詳細については、プラグイン サイトを確認してください。

ここに例があります

于 2012-11-12T16:12:13.937 に答える