We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Browsers are pretty forgiving, so the fact that it renders a valid URL doesn't mean that the URL will be parsed correctly by Twitter.

    Try this:

    $screenName = 'BobRay';
    $includeRts = '1';
    $count = '2';
    
    
    $url = 'hppp://api.twitter.com/1/statuses/user_timeline.json?include_rts="' . $includeRts . '"&screen_name="' . $screenName . '&count="' . $count . '"';



    ------------------------------------------------------------------------------------------
    PLEASE, PLEASE specify the version of MODX you are using.
    MODX info for everyone: http://bobsguides.com/modx.html
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 40395
      • 67 Posts
      BobRay - thanks.

      I ended up with:

      $url = 'hppp://api.twitter.com/1/statuses/user_timeline.json?include_rts=' . $includeRts . '&Screen_name=' . $screenName . '&Count=' . $count . '';


      which seems to work, returning $ouput to the screen -

      Time: Thu Oct 04 09:28:50 +0000 2012Tweet: Nice idea RT @TechCrunch: Amazon Offers A New Simulator For Developers To Test Email In Apps http://t.co/dnSm9Scn by @alexwilliamsTime: Thu Oct 04 09:27:27 +0000 2012Tweet: RT @joseeight: am i the only one annoyed about Microsoft's IE9 campaign? i see ads all over the place, how about spending the money gett ...


      What I don't get is that it was setting &Count= &Screen_name= to have a leading capital letter that made the difference - which was a bit unexpected.

      Off now to order your book and look for hints on how to display $output sensibly !





        • 3749
        • 24,544 Posts
        I'm glad you got it sorted. I don't know where the caps would have come from.


        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone: http://bobsguides.com/modx.html
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 40395
          • 67 Posts
          The odd thing is it seems to need the caps to work ??