Comments (24)
Hm. The variable being checked should be an object, since JSON data is always (with the settings I use, anyway) represented as an object, not an array, in PHP. Could be a connection error, which is represented as an array in the code, but that should be catched on line 166 in the same file.
It'd be helpful if you could output the full value of $data when this occurs, and paste it here.
from tweetnest.
This is happening with some regularity. Can you provide a patch which logs the debugging output you want? I'm not sure how to trap a fatal error in PHP.
from tweetnest.
Does loadtweets.php use API v1.1? If not, then I think support needs to be added.
I'm guessing the previous intermittent failures coincided with the blackouts of API v1. Today, Twitter turned off v1 entirely, forever, and this error is now 100% reproducible.
from tweetnest.
Has stopped working since yesterday. Though I am not getting the error mentioned here. Waiting for an update.
from tweetnest.
Well, crap. I was hoping to have the next version of Tweet Nest done before this moment, however due to me having a super busy spring and graduating university this month, regrettably this didn't come to pass. I won't have time to look at this issue again until next month.
If anyone has more time than me, feel free to implement an authentication system like abraham's twitteroauth in the current code, and ask me anything about that here. If not, I'm afraid we will all have to wait.
from tweetnest.
Would you then please add twitter archive load like the one from user tralafiti?
from tweetnest.
Can this help out at all? https://github.com/alexmuller/tweetnest/tree/oauth-integration
from tweetnest.
"Authentication required on all endpoints - In version 1.1, we're requiring applications to authenticate all of their requests with OAuth 1.0a or Application-only authentication."
From Version 1.1 of the Twitter API Documentation: https://dev.twitter.com/docs/api/1.1/overview
I posted more technical details on Issue #49.
from tweetnest.
I've actually started implementing this on my twitter11 branch. Not going to give an ETA since poking around in someone else's code is always tricky.
from tweetnest.
@sr4136 Yes, with trivial changes (in lib/twitteroauth.php and inc/class.twitterapi.php) to point to the v1.1 api location that is exactly what's needed. I fixed mine this weekend and all is back to normal archiving away without errors. It's worth noting that I started with a fresh install since my DB was getting spammed with null entries once the v1.0 API went dark. That was referenced in a pull request that was closed (#42) so people are probably not seeing that the work is already more or less done to hack it back to working order.
Edit: Well, more or less; the favorites fetching never worked for me, but since favorites are just your own tweets it's a feature I don't mind ditching.
from tweetnest.
@astrobokonon would you share ur loadtweets fix?
from tweetnest.
I fixed this here if you're interested: https://github.com/victorjacobs/tweetnest/tree/twitter11
from tweetnest.
@victorjacobs thank you, will take a closer look at this tomorrow :)
from tweetnest.
To add some more info on @victorjacobs awesome fix: you'll need to re-run the setup.php file from your browser to walk through generating the OAuth tokens with Twitter. To re-run setup.php, you need to have a clean config.php file. So you want to backup your config.php, overwrite your tweetnest directory with the version from @victorjacobs, run through setup.php, taking the values from your backed-up config.php.
from tweetnest.
@victorjacobs that worked perfectly, thanks!
and @madsushi thanks for pointing out the re-running of the setup file.
from tweetnest.
@victorjacobs Awesome work, man! Thank you!
from tweetnest.
You're welcome! I requested @graulund to pull this into his master.
from tweetnest.
@victorjacobs Hey, I cloned your repo, switched over to the branch, copied the files & when I execute loadtweets.php, I'm getting the same error:
sathya /var/www/sbhat.me/tw/maintenance
$ php loadtweets.php
Trying to grab from user_id=11594372...
Importing:
User ID: 11594372
Total tweets: , Approx. page total: 0
Newest tweet I've got: 344557797431721984
Retrieving page #1: statuses/user_timeline.json?user_id=11594372&include_rts=true&include_entities=true&count=200&since_id=344557797431721984
1 new tweets on this page
PHP Fatal error: Cannot use object of type stdClass as array in /var/www/sbhat.me/tw/maintenance/loadtweets.php on line 113
Fatal error: Cannot use object of type stdClass as array in /var/www/sbhat.me/tw/maintenance/loadtweets.php on line 113
Any idea why this is so?
from tweetnest.
@SathyaBhat Like @madsushi pointed out in this thread you have to reinstall Tweetnest, cause the setup.php
has to get an AccessToken from Twitter. Here's what you have to do: Copy your inc/config.php
away, reinstall Tweetnest into the same database, but change your table_prefix
. After reinstalling tweenest, you just change the table_prefix
in inc/config.php
back to the old value. (Don't replace your new inc/config.php
with the old one!)
from tweetnest.
@gr4y yeah, that's pretty much what I had done - removed config, re-ran, setup with different db name, and then switched it over after the setup was done. Not sure if being dense or missing something else.
from tweetnest.
@SathyaBhat you can also do a fresh Nest by importing your tweet archive so you won't loose your old tweets. Folder 'archive' and loadarchive.php from maintenance is needed from @tralafiti repo. Worked fine for me too. You only need to request the tweet archive on twitter.com in the settings and upload the monthly json in the archive folder and run loadarchive.php after you have run loaduser.php.
from tweetnest.
that stupid moment when you didn't switch branches after cloning :| Thanks @Siemser & @gr4y
from tweetnest.
@SathyaBhat I haven't switched branches either the first time I reinstalled tweetnest. I thought that I am the only one who is that stupid. That's why I haven't asked you if you switched branches.
from tweetnest.
Fixed in the newest version.
from tweetnest.
Related Issues (20)
- twitter_screenname is ignored HOT 1
- Can't set up Tweetnest with Firefox HOT 1
- Tweets harvesting by #hashtag isnt' possible? HOT 3
- 404 when loading monthts / favorites etc. HOT 1
- crontab not working HOT 4
- Empty tweets when Emojis are used as first character HOT 1
- Sudden Stop HOT 3
- preg_match /e deprecated in PHP 5.5 HOT 1
- Favorites are now likes
- Deprecation warning in PHP 5.5 HOT 2
- Month/days not loading HOT 5
- Favourites Rate Limit exceeded
- Problem with Authentication HOT 1
- Only standard Unicode characters are displayed properly
- 'Could not connect to Twitter. Refresh the page or try again later.' HOT 7
- Can't reach archive HOT 2
- Search string not parsing properly HOT 3
- Docker container on Docker hub HOT 5
- Does Tweetnest already support the new 280 characters tweet length? HOT 6
- Running on PHP7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tweetnest.