Display Last Tweet function - search results (1 post)

  1. kdubya16
    Posted 4 years ago #

    I haven't been able to find an answer to this question and thought I may get some good answers here....

    I have this solution in place for displaying my latest tweets, but my Twitter ID is not being found. I have tried using other Twitter user names and it works - why wouldn't I be showing up in the search results?

    This code is in my functions.php file:

    function displayLatestTweet($twitterID){
         $latest_tweet = fetch_rss("http://search.twitter.com/search.atom?q=from:" . $twitterID . "&rpp=1");
         echo $latest_tweet->items[0]['atom_content'];

    And this in my template file:
    <p><?php displayLatestTweet('twitter_name'); ?></p>


Topic Closed

This topic has been closed to new replies.

About this Topic