Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #40

Open
raws4581 opened this issue Aug 26, 2013 · 10 comments
Open

Not working #40

raws4581 opened this issue Aug 26, 2013 · 10 comments

Comments

@raws4581
Copy link

I follow your steps and not working, any help would be appreciated.
http://www.topteamfitnessacademy.com/wp/

@SabeBarker
Copy link

In your head tags you have:

modpath: "/twitter/index.php"

But then in your jquery.tweet.js you have:

modpath: "http://www.topteamfitnessacademy.com/wp/wp-content/themes/topteam/twitter/index.php"


Mine had tweets loading also until I had this in my head tags:

modpath: "./twitter/index.php",

And this in my jquery.tweet.js:

modpath: "/twitter/",


I simply played around until it worked... Try various paths like:

modpath: "./wp-content/themes/topteam/twitter/index.php"

in your head tags

and:

modpath: "/wp-content/themes/topteam/twitter/"

in your jquery.tweet.js


I'm not too sure about wordpress integration but I do know there is a few issue discussions here about it that I remember looking over, there was an issue with mootools for instance. I know that wordpress doesn't work to well with relative urls/paths so absolute urls might also work best.

@raws4581
Copy link
Author

I have tried it all can't get it to work... are you using WP?

@SabeBarker
Copy link

No my sites from scratch. I was going to use it on one of my wordpress sites so I will give it a go and see if I can get it working...

@raws4581
Copy link
Author

I was reading the WP issue on here and I follow those step as he said it go it working but no luck yet.. seems like it cant communitcate with twitter i get a Json error

{"errors":[{"message":"Bad Authentication data","code":215}]}

@SabeBarker
Copy link

I have it working on wordpress 3.6 through the sidebar text/html widget.

Instead of having tweet.js-mod in the themes folder I have it in the root directory just like my other site.

In my head tag I put:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/twitter/jquery.tweet.js"></script>

and

<script type='text/javascript'>
    $(document).ready(function() {
    $('.tweet').tweet({
        avatar_size: 28,
        count: 10,
        username: "myusername",
        loading_text: "loading feed...",
      });
    });
</script>

Then I added:

modpath: "http://www.domain.com/twitter/index.php",

into jquery.tweet.js...

Then finally added:

<div class="tweet"></div>

into my wordpress text widget.

@raws4581
Copy link
Author

I have tried both your methods move the folder around, root directory, the result is the same, trying to scratch my head and can't figure it out, almost two days fuill in to this problem and can't get it to work

@SabeBarker
Copy link

One thing to note is that I had the jquery for wordpress:

<script type='text/javascript' src='http://www.domain.com/wp-includes/js/jquery/jquery.js?ver=1.10.2'></script>
<script type='text/javascript' src='http://www.domain.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>

But it wasn't working until I also added this jquery to the head tag:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Give that a go and see if it makes a difference?

@SabeBarker
Copy link

Also I am seeing these errors in firebug:

Warning: require(/tmhOAuth.php) [function.require]: failed to open stream: No such file or directory in /home/topteamf/public_html/wp/wp-content/themes/topteam/twitter/index.php on line 141

Fatal error: require() [function.require]: Failed opening required '/tmhOAuth.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/topteamf/public_html/wp/wp-content/themes/topteam/twitter/index.php on line 141

My line 141 of index.php shows:

require $this->lib.'tmhOAuth.php';

If it hasn't been changed and it's the same then there is still an issue with your modpath.

I'm not too sure whether the head script overrides jquery.tweet.js or vise versa but make sure they atleast have the same settings, for example in your jquery.tweet.js you have:

modpath: "http://www.topteamfitnessacademy.com/wp/wp-content/themes/topteam/twitter/index.php",

but in your head tag you have:

modpath: 'http://www.topteamfitnessacademy.com/wp/wp-content/themes/topteam/twitter/index.php',

Also in jquery.tweet.js you have username: null; so if jquery.tweet.js overrides the head script then there would be no username set. I just filled both for good measure?!@? I also didn't have the modpath in my head tag just set it in jquery.tweet.js

If you are still getting the json error:
{"errors":[{"message":"Bad Authentication data","code":215}]}

Check your twitter app credentials in /twitter/index.php as that is an authentication error for your twitter app.

    // Your Twitter App Consumer Key
private $consumer_key = 'myconsumerkey';

// Your Twitter App Consumer Secret
private $consumer_secret = 'myconsumersecret';

// Your Twitter App Access Token
private $user_token = 'myaccesstoken';

// Your Twitter App Access Token Secret
private $user_secret = 'mytokensecret';

@raws4581
Copy link
Author

phoenixlaef, I got it working. Thanks for your help. It was the token key... THANKS

@SabeBarker
Copy link

Awesome I'm glad you got it working :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants