-
Notifications
You must be signed in to change notification settings - Fork 93
API v1.1 support required in loadtweets.php #39
Comments
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. |
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. |
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. |
Has stopped working since yesterday. Though I am not getting the error mentioned here. Waiting for an update. |
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. |
Would you then please add twitter archive load like the one from user tralafiti? |
Can this help out at all? https://github.com/alexmuller/tweetnest/tree/oauth-integration |
"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." I posted more technical details on Issue #49. |
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. |
@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. |
@astrobokonon would you share ur loadtweets fix? |
I fixed this here if you're interested: https://github.com/victorjacobs/tweetnest/tree/twitter11 |
@victorjacobs thank you, will take a closer look at this tomorrow :) |
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. |
@victorjacobs that worked perfectly, thanks! and @madsushi thanks for pointing out the re-running of the setup file. |
@victorjacobs Awesome work, man! Thank you! 👍 |
You're welcome! I requested @graulund to pull this into his master. |
@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:
Any idea why this is so? |
@SathyaBhat Like @madsushi pointed out in this thread you have to reinstall Tweetnest, cause the |
@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. |
@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. |
@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. 😆 |
Fixed in the newest version. |
I'm intermittently seeing this error when the loadtweets.php cronjob runs. I haven't received this error ever when running the job manually.
The text was updated successfully, but these errors were encountered: