Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
fuel-package Twitter (token issues)
  • Hi folks I revisited an old script made in FuelPHP which uses https://github.com/fuel-packages/fuel-twitter#twittergetapi_path-args--array Now, when the user is trying to login the following error occurs:
    ErrorException [ Notice ]: Trying to get property of non-object PKGPATH/twitter/classes/twitter/oauth.php @ line 333

    The line of code in question is
    return $this->auth_url.'?oauth_token='.$token->oauth_token;
    

    link to github page Hopefully someone will know how to fix this as I'd love to check out an old App someone made in Fuel.
    Regards,
    Jamie
  • Quickly peeked in the code, and I wonder if that has ever worked. I can't work out how $token can ever be an object there...
  • Harro Verton wrote on Wednesday 10th of October 2012:
    Quickly peeked in the code, and I wonder if that has ever worked. I can't work out how $token can ever be an object there...

    I've used this before which is the frustrating thing. It was working up until a couple of weeks ago if I remember rightly. Has there been any changes to the API from Twitter around this? Obviously I'm not expecting you to know everything but I'll shout that out to the rest of the community. I tried looking into Social Package but the code seems ugly having to do \Social\Twitter::instance()->logged_in(); etc.. Can't seem to do \Social\Twitter::instance()->get('account/verify_credentials');
    Cheers!
  • Enabled debug mode which provided the following message:
    exception 'Twitter\TwitterException' with message ' Desktop applications only support the oauth_callback value 'oob'
    /oauth/request_token

    Update: This was helpful, https://dev.twitter.com/discussions/392 Never knew no callback placeholder locked it to desktop mode. I'll know for future! However, the problem now is after you manage to sign in, it then provides this error on the callback function..
    ErrorException [ Error ]: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])
    
    PKGPATH/twitter/classes/twitter/connection.php @ line 184
  • If you output the OAuth response, the Twitter API states that the URL couldn't be found. Twitter removed access to the none versioned API this week. The versioned URLs are the now the only ones that work. More information can be found at https://dev.twitter.com/discussions/10803 The twitter package needs updating to use the new API urls. I think some of the workflow also needs to be tweaked as I changed the URL variables but it wouldn't complete the authentication process. So some code changes will be needed, hopefully it'll be possible to work them into the twitter package on GitHub :-)
  • Just wanted to share https://github.com/maxsoftware/fuel-twitter This fork is a fix for the issue we're having with the current twitter package. Hopefully Dan will pull this into his repo.
  • Perfect, that works great. Thanks.
  • After I tried use Dan's repo couple of time. I decided to build my own package. I've just finished the documantation. 

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion