Tweet.js-Mod
Tweet.js-Mod copied to clipboard
Not working
I follow your steps and not working, any help would be appreciated. http://www.topteamfitnessacademy.com/wp/
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.
I have tried it all can't get it to work... are you using WP?
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...
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}]}
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.
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
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?
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';
phoenixlaef, I got it working. Thanks for your help. It was the token key... THANKS
Awesome I'm glad you got it working :-)