ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Twitter Timeline PHP errors New Info (for me)

June 30, 2011 9:05pm

Subscribe [3]
  • #1 / Jun 30, 2011 9:05pm

    daniel090

    22 posts

    Ok so this thing never works for me. Others have had issues… I am on EE 1.7.1 and have the latest version…

    Instead of deleting the cache I read what was in it:

    1309477034
    <?xml version=“1.0” encoding=“UTF-8”?>
    <hash>
      <error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error>
      <request>/1/statuses/user_timeline.xml?include_entities=true&screen_name=danielphillip</request>
    </hash>

    I have the following code:

    {exp:twitter_timeline screen_name="danielphillip" create_links="user_mentions|hashtags|urls" cache="yes" refresh="60" limit="10" use_stale_cache="yes"}
    
    
    
    {text}
    <a href="http://twitter.com/danielphillip" target="blank" rel="noopener">{created_at format="%g:%i %a  %M %d"}</a>
    
    
    {/exp:twitter_timeline}

    I believe this should only update every hour.. so why is the plug-in making so many requests? Maybe this helps fix it… maybe not. Here’s hoping

  • #2 / Jul 01, 2011 9:49am

    Kevin Smith

    4784 posts

    Hi Daniel,

    Looks like one of your parameters might be wrong, so the plugin is making an API call every time its loaded. Instead of refresh, try using the parameter twitter_refresh instead.

    Did that take care of it?

  • #3 / Jul 01, 2011 3:56pm

    daniel090

    22 posts

    updated my code and 2 hours later… same PHP error on line 452… same cache message.  :(

    Warning: Invalid argument supplied for foreach() in /plugins/pi.twitter_timeline.php on line 452

    Thanks tho!

  • #4 / Jul 04, 2011 10:55pm

    daniel090

    22 posts

    OKAY. I even took out the ‘refresh’ variable entirely. Still the same errors persist. *so confused*

  • #5 / Jul 07, 2011 4:25pm

    Kevin Smith

    4784 posts

    Warning: Invalid argument supplied for foreach() in /plugins/pi.twitter_timeline.php on line 452

    We’ve discovered this error can appear when Twitter throttles back your ability to make API calls to their servers, something that typically happens when your site tries to retrieve its timeline too often within an hour or so. You will need caching on for this plugin or you’ll continue to receive these errors. Make sure you have the most recent version of the plugin since a caching bug was fixed in version 1.3.2. Make sure you’re using the twitter_refresh parameter.

    Now check to make sure your ./system/cache folder is set to have 777 permissions, and delete any folders already in the cache folder.

    Does the plugin operate correctly now?

  • #6 / Jul 07, 2011 9:08pm

    daniel090

    22 posts

    No. Sadly the same error pops up.

  • #7 / Jul 12, 2011 8:04pm

    Kevin Smith

    4784 posts

    Hey daniel090,

    Sorry this is causing so much frustration. Be on the lookout for an email from me. We’ll see if we can’t get to the bottom of this.

  • #8 / Jul 22, 2011 12:03pm

    Kevin Smith

    4784 posts

    Hey Daniel,

    So it looks like Twitter now sends an error message that isn’t formatted correctly according to its own documentation. Now that we know that, I’ve tweaked the plugin’s code to compensate. You’ll still often receive a rate limiting error response from Twitter (which was the case here), but the plugin’s handling of that error will now do what it was designed to do: display no errors on screen, and just print the error message into the template debugger.

    Regarding the rate limiting, that’s happening because Twitter rate limits unauthenticated requests by the IP requesting it, and if you’re on a shared server with other sites that are pinging the Twitter API, you’re all bundled together as one group and rate limited together.

    The updated plugin is already loaded in your installation, and I’ll make sure the plugin gets updated and posted to our website very soon. Does that take care of it for you?

  • #9 / Jul 22, 2011 5:38pm

    daniel090

    22 posts

    THANK YOU SO MUCH!! 😊

  • #10 / Jul 22, 2011 5:48pm

    Kyle Cotter

    730 posts

    Woot! Kevin, you rock!

    Glad this fixes everything for you Daniel, please post again if you have any more issues.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases