Twitterの最後のツイートをテキストだけ表示する

Ads

Result

jQuery

//jsonデータを取得
$.getJSON("http://twitter.com/statuses/user_timeline/ユーザーID.json?callback=?", 
          //id="twitter"にテキストで返す
          function(data) {$("#twitter").html(data[0].text);
});

css

#twitter{
    margin:25px;
    width: 400px ;
    padding:25px;
    background:#eee;
}

html

<p id="twitter"></p>

Warning: include(/home/youhei0828/kachibito.net/public_html/wp-content/themes/cocoon-master/my-php/jquery-other-snippets.php): Failed to open stream: No such file or directory in /home/youhei0828/kachibito.net/public_html/wp-content/themes/kachibito7_with_cocoon_child/functions-module/shortcode/add-post-myphp.php on line 7

Warning: include(): Failed opening '/home/youhei0828/kachibito.net/public_html/wp-content/themes/cocoon-master/my-php/jquery-other-snippets.php' for inclusion (include_path='.:/opt/php-8.1.29/data/pear') in /home/youhei0828/kachibito.net/public_html/wp-content/themes/kachibito7_with_cocoon_child/functions-module/shortcode/add-post-myphp.php on line 7