Tweet.js-Mod
Tweet.js-Mod copied to clipboard
Loading Tweets..nothing else?
Hi, I come to you in my time of need.
I believe I have this setup right...
Here is my test URL:
http://www.philau.edu:81/library/twitter2.html
On that page, I have this:
I have the twitter folder at the document root
In the Lib folder, I modified tempOAuth.php with my Twitter app credentials.
I also modified index.php with the Twitter app credentials.
In jquery.tweet.js, I changed the modpath variable to: "/twitter/"; I also renamed it to '/twitter/index.php',
I did not modify anything else.
Using firebug, I get this:
http://www.philau.edu:81/library/twitter/index.php 200 OK
On the NET tab...so I know the path is correct.
Any idea what I am doing wrong?
Thanks so much,
Michael Cabus
Hi
No changes needed to tempOAuth.php , leave it as it is. The changes just needed is for index.php
For modpath, you need to add it to the js code of the widget, like
$(document).ready(function(){
$(".twitter_widget").tweet({
username: "brad_frost",
modpath: './js/twitter/', // here is modpath
join_text: "auto",
avatar_size: 48,
count: 3,
auto_join_text_default: "we said,",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied to",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets..."
});
});
For my case of this code, i added this js code to custom.js file in js folder, so i added js before /twitter/
Hi, I’m sorry, just to clarify…
I’m adding the js code you sent to index.php?
I have code like that added to twitther.html…do I need to use .php to make this work?
Thanks for your help,
Michael
Systems Librarian, Paul J. Gutman Library Philadelphia University
Phone (215) 951-5365 Email: [email protected]
"Give me a home on the east coast, with blueberries growing over a fence post"--Girlyman
From: moradxD [mailto:[email protected]] Sent: Wednesday, July 17, 2013 10:21 PM To: StanScates/Tweet.js-Mod Cc: Cabus, Michael Subject: Re: [Tweet.js-Mod] Loading Tweets..nothing else? (#31)
Hi
No changes needed to tempOAuth.php , leave it as it is. The changes just needed is for index.php
For modpath, you need to add it to the js code of the widget, like
$(document).ready(function(){
$(".twitter_widget").tweet({
username: "brad_frost",
modpath: './js/twitter/', // here is modpath
join_text: "auto",
avatar_size: 48,
count: 3,
auto_join_text_default: "we said,",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied to",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets..."
});
});
For my case of this code, i added this js code to custom.js file in js folder, so i added js before /twitter/
— Reply to this email directly or view it on GitHubhttps://github.com/StanScates/Tweet.js-Mod/issues/31#issuecomment-21158710.
Hi, Okay, I think I've figured this out, but still have issues (same as above).
Here is the code I have now:
$(document).ready(function() { $('.twitterfeed').tweet({ join_text: "auto", modpath: './twitter/', // here is modpath username: "GutmanLibrary", avatar_size: 32, count: 3, loading_text: "loading tweets..." }); });
This was in http://www.philau.edu:81/library/twitter2.html, but I am now loading it as an external js file (http://www.philau.edu:81/library/twitter/tweet.js).
I inserted the modpath, as suggested.
I'm still getting load tweets message and nothing else...I will continue to investigate..please let me know if you can discover any errors.
Hi
Your live preview is not working. It will be better if it's working to know the problem you have. Take in mind that no need to add js code in index.php , leave the index.php as it's but with replacing the 4 contents needed from the twitter application you made.
For more description, you will find this code in index.php
// Your Twitter App Consumer Key private $consumer_key = 'YOUR_CONSUMER_KEY';
// Your Twitter App Consumer Secret
private $consumer_secret = 'YOUR_CONSUMER_SECRET';
// Your Twitter App Access Token
private $user_token = 'YOUR_ACCESS_TOKEN';
// Your Twitter App Access Token Secret
private $user_secret = 'YOUR_ACCESS_TOKEN_SECRET';
replace these 4 lines with the 4 values you made from the twitter app you have created from here https://dev.twitter.com/apps
Also take in mind to add the jquery.tweet.js dragged in the download files. The last step is where to add the js code which run the widget. It's the same as i wrote before
$(document).ready(function(){
$(".twitter_widget").tweet({
username: "brad_frost",
modpath: './js/twitter/',
join_text: "auto",
avatar_size: 48,
count: 3,
auto_join_text_default: "we said,",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied to",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets..."
});
});
But take in mind this important note. If you are placing the twitter folder in the main folder of the website, then you will make the mode path as modpath: './twitter/' ... and if you are placing twitter folder in any other place, so add the name folder before ./twitter/ as modpath: './foldername/twitter/'
If you have live preview, i will give you a successful solution. Also if you followed the steps in documentation, sure you will solve the issue.
Hi, Here is the preview, which will now work:
http://philau.edu/library/twitter2.html
I am looking at the console in Firebug, and note this:
POST http://philau.edu/library/twitter/ 405 Method Not Allowed
I'm wondering if the server is preventing the tweets from loading?
Thanks so much for your help,
Michael
@cabusmichael After a little research, I recommend you change your modpath to '/library/twitter/index.php' Let me know if that doesn't work
Hi Stan, I did that, seems to have corrected the POST error in the console, but I still get loading tweets with no tweets?
Michael
Something is awry server-side. Since you're running IIS, I would advise that you ensure that you have PHP installed, it's working correctly, and is at least version 5.3. Also check the PHP error logs, it's possible you're missing cURL libraries or something of that nature
P.S. I understand you may not have access to the server logs or libraries available, so if you're unable to explore that route I would also suggest some of the similar Twitter proxies written in ASP mentioned towards the bottom of https://github.com/seaofclouds/tweet/issues/264, they may work better for you in an IIS environment
Thanks Stan!
I don't have access to the server logs; but I emailed the person who has access;
I will look at the ASP options, too--it would be great to get this to work.
$(document).ready(function(){ $(".twitter_widget").tweet({ username: "brad_frost", modpath: './js/twitter/', join_text: "auto", avatar_size: 48, count: 3, auto_join_text_default: "we said,", auto_join_text_ed: "we", auto_join_text_ing: "we were", auto_join_text_reply: "we replied to", auto_join_text_url: "we were checking out", loading_text: "loading tweets..." }); });
where "$ (document). ready (function () {" function does not work on most sites. Instead of "jQuery (document). ready (function ($) {" available