Code Monkey home page Code Monkey logo

Comments (24)

graulund avatar graulund commented on July 26, 2024

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.

doherty avatar doherty commented on July 26, 2024

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.

doherty avatar doherty commented on July 26, 2024

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.

navjotjsingh avatar navjotjsingh commented on July 26, 2024

Has stopped working since yesterday. Though I am not getting the error mentioned here. Waiting for an update.

from tweetnest.

graulund avatar graulund commented on July 26, 2024

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.

Siemser avatar Siemser commented on July 26, 2024

Would you then please add twitter archive load like the one from user tralafiti?

from tweetnest.

sr4136 avatar sr4136 commented on July 26, 2024

Can this help out at all? https://github.com/alexmuller/tweetnest/tree/oauth-integration

from tweetnest.

 avatar commented on July 26, 2024

"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.

victorjacobs avatar victorjacobs commented on July 26, 2024

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.

astrobokonon avatar astrobokonon commented on July 26, 2024

@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.

Siemser avatar Siemser commented on July 26, 2024

@astrobokonon would you share ur loadtweets fix?

from tweetnest.

victorjacobs avatar victorjacobs commented on July 26, 2024

I fixed this here if you're interested: https://github.com/victorjacobs/tweetnest/tree/twitter11

from tweetnest.

Siemser avatar Siemser commented on July 26, 2024

@victorjacobs thank you, will take a closer look at this tomorrow :)

from tweetnest.

madsushi avatar madsushi commented on July 26, 2024

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.

sr4136 avatar sr4136 commented on July 26, 2024

@victorjacobs that worked perfectly, thanks!

and @madsushi thanks for pointing out the re-running of the setup file.

from tweetnest.

gr4y avatar gr4y commented on July 26, 2024

@victorjacobs Awesome work, man! Thank you! 👍

from tweetnest.

victorjacobs avatar victorjacobs commented on July 26, 2024

You're welcome! I requested @graulund to pull this into his master.

from tweetnest.

SathyaBhat avatar SathyaBhat commented on July 26, 2024

@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.

gr4y avatar gr4y commented on July 26, 2024

@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.

SathyaBhat avatar SathyaBhat commented on July 26, 2024

@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.

Siemser avatar Siemser commented on July 26, 2024

@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.

SathyaBhat avatar SathyaBhat commented on July 26, 2024

that stupid moment when you didn't switch branches after cloning :| Thanks @Siemser & @gr4y

from tweetnest.

gr4y avatar gr4y commented on July 26, 2024

@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.

graulund avatar graulund commented on July 26, 2024

Fixed in the newest version.

from tweetnest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.