hexplor / grav-plugin-latest-tweets

Display latest tweets from your twitter account on your grav page.
MIT License
6 stars 0 forks source link

OAuth exception on all pages. #3

Open Yokai opened 6 years ago

Yokai commented 6 years ago

Hi, I've been trying to get latest-tweets to run at all :-(

As soon as I enable the plugin I get the following:

/home/rrpvdkhs/public_html/user/plugins/latest-tweets/twitteroauth/twitteroauth/OAuth.php
<?php
// vim: foldmethod=marker

/* Generic exception class
 */
class OAuthException extends Exception {
  // pass
}

class OAuthConsumer {
  public $key;
  public $secret;

  function __construct($key, $secret, $callback_url=NULL) {
    $this->key = $key;
    $this->secret = $secret;
    $this->callback_url = $callback_url;
  }

  function __toString() {
    return "OAuthConsumer[key=$this->key,secret=$this->secret]";
  }
}

class OAuthToken {
  // access tokens and request tokens
  public $key;
  public $secret;

  /**
   * key = the token
   * secret = the token secret
   */
  function __construct($key, $secret) {
    $this->key = $key;
    $this->secret = $secret;
  }

  /**
   * generates the basic string serialization of a token that a server
Arguments
"Cannot redeclare class OAuthException"

My latest-tweets.yaml looks like this:

enabled: true
twitter_id: 245938282
tweets_to_display: 3
ignore_replies: '1'
include_rts: '1'
consumerkey: [Mine]
consumersecret: [Mine]
accesstoken: [Mine]
accesstokensecret: [Mine]
built_in_css: '1'

Can you point me in the direction of how to fix - as soon as I enable the plugin all pages die with this exception. I don't even have any pages using latest-tweets yet....

Thanks!

hexplor commented 6 years ago

With twitter ID i meant screen name. Ie: https://twitter.com/microsoft -> goes: Microsoft

https://monosnap.com/file/m48ZvAxbOT8S69O7r7HsV6ima3smC8.png

Let me know if that works :)

Yokai commented 6 years ago

I tried both @CadsOakley and CadsOakley and then @cadsoakley and cadsoakley ... Still the same error.

It seems to be failing before it even gets to that part. If I remove everything and just enable the plugin - the site fails. I've tried reinstalling, clearing cache. everything.

screen shot 2018-06-12 at 12 42 21 pm screen shot 2018-06-12 at 12 41 39 pm

Yokai commented 6 years ago

@hexplor - so I think I might have a clue. It seems that there might be another instance of oAuth running. But I can't find where that is. Any clues would be super helpful

hexplor commented 6 years ago

Hmm.. weird. I know that grav was adding some oauth stuff. Will check soon.I have few plans for new features.

CadsOakley commented 6 years ago

Thx... I appreciate it. Just wish I could get it to work.

On Sun, Jun 17, 2018, 2:30 PM Karol Orzeł notifications@github.com wrote:

Hmm.. weird. I know that grav was adding some oauth stuff. Will check soon.I have few plans for new features.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hexplor/grav-plugin-latest-tweets/issues/3#issuecomment-397907872, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZgz_7vd5Svjix2BuPDMXmYI1Lq7tEYks5t9sqAgaJpZM4Uh50P .

hexplor commented 6 years ago

Please make sure it's set like that: https://monosnap.com/direct/Qr8QmkgrOZCCWpmz2XYdVekpVUiy4c

Also please tell me what plugins you have have enabled.