StanScates / Tweet.js-Mod

Basic wrapper for Seaofclouds / Tweet.js that incorporates functionality with Twitter's v1.1 API
MIT License
234 stars 103 forks source link

Cannot read property 'results' of null #58

Closed cspicuzza closed 3 years ago

cspicuzza commented 10 years ago

The plugin was working for a while now. I'm guessing upgrading to jQuery 1.11.0 causes the following error:

Chrome reports:

'Uncaught TypeError: Cannot read property 'statuses' of null
line 285

if(response.statuses !== undefined) { resp = response.statuses; } else if(response.results !== undefined) { resp = response.results; } else { resp = response; }

reidelliott commented 10 years ago

We started getting this same error on production only. Everything works fine in development. I'm using jQuery 1.8.3 in both environments.

drbroad commented 10 years ago

regardless of jquery, i get this on wpengine but not on my local environment. Very frustrating.

with loggin enabled i get: tweet.js: Failed writing header but tht could be a red herring as i think its either a curl error or something to do with the server time being too out of sync with twitter: https://groups.google.com/forum/#!topic/twitter-development-talk/qt7pK8XDTyk

Ensure that your system's timestamp is in sync with Twitter's. We return the current time in the "Date" HTTP header with every request. If your request fails due to a timestamp mismatch, use this time to determine the delta between the system clock and our server clock and adjust your oauth_timestamps for subsequent requests accordingly. https://dev.twitter.com/discussions/204

reidelliott commented 10 years ago

Good stuff!I can confirm everything works great in a non-WPEngine environment. 

On Friday, Aug 22, 2014 at 1:34 AM, drbroad notifications@github.com, wrote:

regardless of jquery, i get this on wpengine but not on my local environment. Very frustrating.

with loggin enabled i get: tweet.js: Failed writing header but tht could be a red herring as i think its either a curl error or something to do with the server time being too out of sync with twitter: https://groups.google.com/forum/#!topic/twitter-development-talk/qt7pK8XDTyk

Ensure that your system's timestamp is in sync with Twitter's. We return the current time in the "Date" HTTP header with every request. If your request fails due to a timestamp mismatch, use this time to determine the delta between the system clock and our server clock and adjust your oauth_timestamps for subsequent requests accordingly. https://dev.twitter.com/discussions/204

— Reply to this email directly or view it on GitHub.