Tweet.js-Mod icon indicating copy to clipboard operation
Tweet.js-Mod copied to clipboard

Setting up the Twitter App

Open burble opened this issue 12 years ago • 15 comments

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

burble avatar Jun 13 '13 12:06 burble

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

naileditdesign avatar Jun 13 '13 15:06 naileditdesign

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

agoudsmit avatar Jun 17 '13 08:06 agoudsmit

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?

burble avatar Jun 17 '13 10:06 burble

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

agoudsmit avatar Jun 17 '13 10:06 agoudsmit

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.

burble avatar Jun 17 '13 12:06 burble

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?

agoudsmit avatar Jun 17 '13 13:06 agoudsmit

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

burble avatar Jun 17 '13 13:06 burble

Perfect. Happy i could help

agoudsmit avatar Jun 17 '13 14:06 agoudsmit

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!

colinelliot avatar Jun 17 '13 18:06 colinelliot

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

agoudsmit avatar Jun 17 '13 18:06 agoudsmit

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?

iq-nkraft avatar Jun 17 '13 19:06 iq-nkraft

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.

sulliwane avatar Jun 25 '13 13:06 sulliwane

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?

Stefan-Oost avatar Jul 01 '13 09:07 Stefan-Oost

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

agoudsmit avatar Jul 01 '13 09:07 agoudsmit

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?

Stefan-Oost avatar Jul 01 '13 09:07 Stefan-Oost