StanScates / Tweet.js-Mod

Basic wrapper for Seaofclouds / Tweet.js that incorporates functionality with Twitter's v1.1 API
MIT License
234 stars 103 forks source link

Setting up the Twitter App #13

Open burble opened 11 years ago

burble commented 11 years ago

Sorry to seem dim - I am moving over from the old version due to the API update now blocking tweet loading.

I have followed the installation instructions for this revised version however I cannot get th etweets to load and I imagine it maybe something at the Twitter Auth end.

I have followed the setup instructions and got all the necessary auth data and input into the index.php - All I can imagine that is going wrong is it is not authorising. Do I need to set a callback URL and do I need to change the Request Settings under the OAuth Tool tab?

Would be great to flesh out the instructions as I am sure when people realise there will be a flood of folk tryin gto update.

Thanks alot - and I hope I can get this to work. (ps the site is here www.ponyexpressclub.com )

Thanks

naileditdesign commented 11 years ago

Hello, im having the same issue i think, i've entered all the relevant data from my twitter app, but i just get the "loading" message generated from this loading_text: 'loading twitter feed...',

I have no other javascript errors on my page according to debugger. Any Twitter app pointers would be very well received, thanks! Adam

agoudsmit commented 11 years ago

Hi Burble,

I just migrated to this twitter plugin and go it working. I have a pretty strict URL handling that gave me some problems with the plugin, in the end i only need to change the mod path and direct it straight to the index.php

so i have this: $j(".twitter").tweet({ modpath: '/twitter/index.php', username: "ShoppingNightDH",
count: 1, loading_text: "ophalen tweets...", refresh_interval: 30 });

That was good enough to make it work, you can see it working on: http://www.shoppingnight.nl

I did use all the details from Twitter and fill it all in the index.php private $consumer_key = ######### private $consumer_secret = ######### private $user_token = '######### private $user_secret = #########

Good luck.

Arnaud

burble commented 11 years ago

Adam - have you fixed your problem? I have tried Arnaud's solutions above but cannot get it to work.

I am using concrete5 CMS and adding this with my theme, I dont think that should be affecting the paths though as it worked before and if I I check the scripts in firebug they are all connected - but it just hangs on the "loading tweets" text.

So I have this is my header:

And I have then also got:

modpath: '/twitter', // [string] relative URL to Tweet.js mod (see https://github.com/StanScates/Tweet.js-Mod)

username: "burbleweb", // [string or array] required unless using the 'query' option; one or more twitter screen names (use 'list' option for multiple names, where possible)

in the jquery.tweet.js file

I have then added my consumer key, secret, user token and user secret to the index.php file.

I have tried loads of variations but I think this is an issue with the authorising and possibly my app setup? Any chance anyone could do an app setup run through to confirm how to do it?

agoudsmit commented 11 years ago

Hi Burble can you change the modpath and leave so i can check the result? Because right now in FF i see that the home page is sent as response not the index.php in the twitter dir

burble commented 11 years ago

I have changed the modpath in the header JS call to

modpath: "/twitter/index.php",

It is also set directly in the jquery.tweet.js to be

modpath: '/twitter/',

I have tried every permutation I can think of in changing these.

I have unhid the tweet div.

Thanks alot for looking at this for me, much appreciated.

agoudsmit commented 11 years ago

Hi burble,

I just checked and i get a 404 on the http://www.ponyexpressclub.com/twitter/index.php Are you sure the path to the twitter folder is correct?

burble commented 11 years ago

Thanks for that - I was doing this within a CMS where everything should be set relative to the Theme folder however it may be that the JS call is relative to the root so I duplicated the folder and placed it at root level and it seems to work - which is great. Thanks alot for your help

agoudsmit commented 11 years ago

Perfect. Happy i could help

colinelliot commented 11 years ago

I think i have this set up correctly - before i read this thread all i got was 'loading tweets...' Tweet.js Mod twitter folder upped, api paswrds in, jquery & example function loaded.

i have the demo set up in a sub folder, so all i needed to do was add the correct mod url in the header script, i tried modpath: "/sandbox/twitter_test/twitter/index.php",

works great. thanks!

agoudsmit commented 11 years ago

I just checked your link, it seems to be working. Good work!

iq-nkraft commented 11 years ago

Hi all, I'm trying to follow the instructions and get this working on a local site running on XAMPP (for test purposes, before I deploy). In the JS console (using Chrome's inspector) I seem to be getting a 500 Server Error on the /twitter/index.php file -- any ideas on what I'm doing wrong?

sulliwane commented 11 years ago

Hi everyone,

I have www.ridetheflavour.fr/twitter/ folder with index.php and /lib/ folder. Index.php is configured with Oauth credentials from twitter app.

I have

<script src="<?php echo get_bloginfo ( 'template_url' );  ?>/js/jquery.tweet.js" charset="utf-8"></script>  

in the header.php of my wordpress install.

And I have this on the first page of my website :

<script type="text/javascript">
$(document).ready(function() {
$('.tweet').tweet({
username: "ridetheflavour",
modpath: "/twitter/index.php",  
avatar_size: 32,
count: 2,
});
});
</script>
<div class="tweet query"></div>

After almost 2 hours, I can't get it working...and it's driving me nuts ! Please, give me some advices, Thank you.

Stefan-Oost commented 11 years ago

I'm struggling with the same problem. I setup the files just like the instructions told me, but it's not working.

You can find an example here at the bottom of the page: http://www.deltasign.nl

I've included the new tweet.js script (http://deltasign.nl/twitter/jquery.tweet.js) and i have this

$(function(){ $("#query").tweet({ avatar_size: 42, count: 2, modpath: "/twitter/index.php", username: "deltasignbv", loading_text: "Twitter doorzoeken..." }); });

in the functions.js file..

But it doesn't work :(

Can someone please help me?

agoudsmit commented 11 years ago

Hi Steve, Im getting a 500 error when i check : http://deltasign.nl/twitter/index.php You'll have to check the php error logs to see why its giving a 500 error (fatal error that stops compiling the php code) regards,

Arnaud

Stefan-Oost commented 11 years ago

I've fixed the error.. But now i'm getting another error:

TypeError: item.user is undefined o.name = item.from_user_name || item.user.name;

How do I fix this?