This is comment page 4 for Authenticating a Twitter Feed for OAuth API V1.1 - Timelines & streams »
Creating a Custom jQuery Twitter Feed (API v1.1) »
Creating a Twitter Search & Analytics tool »
I’m having a problem with PHP files and twitteroauth. can i use dropbox public folder?
Hi Tom,
First, thanks so much for all your work on this. Seems to be the only working sample I have found.
I am getting some crazy output though –
Notice: A session had already been started – ignoring session_start() in /home/westonma/public_html/templates/_inc/news.php on line 21
[{“created_at”:…
This was so insanely helpful. Thank you so much!
Hi,
thank you the great info…
i’m using this code but i couldn’t get my feeds, when login my account partially redirected my authentication URL…
what can i do for this config.php file on OAUTH_CALLBACK url…
i’m given the below file url name:
define(‘OAUTH_CALLBACK’, ‘http://mysummary.me/for_appln/twitter/my_twit1/twitteroauth-master/index.php’);
please guide me..
thanks and advance
Perumal
Hi, cheers for the excellent tutorial.
Got a bit of an error going on here and I can’t quite work it out. I can get the PHP call to work fine (I get a massive amount of JSON garbage), but when it comes to putting the jQuery shine on it, I get the following error.
On the firebug console, it says:
TypeError: feeds is null
for (var i=0; i<feeds.length; i++) {
When I uncomment the "alert(feeds)" line above that, it's just a null alert.
Can you help please? Is it something I've missed?
Cheers,
Tom
Wait…. hold on.
You said nothing in the Tutorial about quoting out echo json_encode($tweets), didn’t you?
Christ, I’m a complete moron.
OK, it’s all working now.
For those who are stupid enough to make the same mistake I did: Don’t quote out the last line of php. (the echo json command).
Sigh. I need another coffee.
Cheers for the excellent tutorial Tom!
hi,
it helped me alot but in some parts I am stuck :S !!! still did not get it very well π !!! from the step 2 when I have to create php file then what ??
can u explain it in a simple way ??
Thanks alot
Since june I used the new version of twitteroauth and all worked fine but since one week, it’s impossible to send any update.
I have the ‘null’ answer.
I’ve tried with your code, update the php version, check for curl … no change
Any ideas ?
THANKS!! You’re a God for me right now!
Hi Tom,
I’m getting “tweet loader” after following the instructions.
Hi,
I am getting the following error when running the php script. I am using xampp.
{“errors”:[{“message”:”Invalid or expired token”,”code”:89}]}
Can someone please help !!
Hi Tom,
First of all I would to thanks you for such a nice tutorial. I have followed the exact instructions given and am getting the error
[]
when I execute the PHP. I am using xampp. I checked the php.ini file and other settings mentioned in the comments above and everything looks good. I am just no sure of the relative path property. Could that be the issue?
Thanks once again.
Ahhaaa finally i am able to fetch tweets π Its still confusing for me to differentiate consumer keys and oauth keys, but no worries, Its working now.
Hi Tom,
I got the app to work at last. Thanks for the great tutorial. I want to add some other functionality as well. Do you know how I can create a json file with the response instead of just echoing it and seeing the results in the browser?
Thanks,
Bhanu.
Thanks a lot
Is it possible to have two twitter feeds on the same page, one from the account and another from a #hashtag? If so how would you go about this.
Just to say, thank you, this has been a major time saver! I was cursing Twitter for changing everything but this is really simple to implement and a really written tutorial. Thanks again
Hi Tom and all!
Thanks for the post and your availability!!!
Works for me in my real server.
Anyone know how to configure XAMPP to allow seeing tweets?
XAMPP returns error “exception is not defined”.
Hi Tom, I spent all day looking at different twitter plugins that would create a custom feed on my client’s website. And I knew about yours from the beginning but I went into the forest of dead twitter plugins anyways. There’s some interesting ones.
Anywho, I’ve followed the tutorial and my client’s feed does not show up at all in the twitter-feed div. I read all the comments and perhaps it could be my client’s webhosts PHP version being too old? The version is PHP 5.3.3
I also saw that a blank page could be a setting in the PHP.ini file with curl being disabled, but the PHP.ini has no disabled_functions. So that’s not it.
Do you have any ideas on were I might have went wrong or why the feed is not showing up?
Thanks for your great efforts.
Sarah
Tom, I’m getting a bad authentication data error. Any thoughts on this?
Hi,
I try to add this twitter script to my wordpress theme and everything work good.. but I can not add username from theme options to get-tweets1.1.php .. Anyone can help me?
Warning: session_start() [function.session-start.html]: Cannot send session cookie – headers already sent by (output started at /home/student/belousv01/public_html/475/hw4/index.php:67) in /home/student/belousv01/public_html/475/hw4/index.php on line 72
Warning: session_start() [function.session-start.html]: Cannot send session cache limiter – headers already sent (output started at /home/student/belousv01/public_html/475/hw4/index.php:67) in /home/student/belousv01/public_html/475/hw4/index.php on line 72
how getting these errors
im getting a NULL as well. i know that it hasn’t have to do with the curl. because i used it before for my Instragram API on the same php file and it works fine with instragram.
Any ideas what be causing the NULL ?
Running PHP Version 5.2.14
Hey, im Getting NULL errors. I am running php version 5.2.14.
I know that CURL works because i used it for my instragram API. I checked my Get() as well i cant find anything wrong. maybe you can take a look ?
Please Help me because i need this to work to complete my project. that’s due on the 10th
Hi Tom
Firstly thanks for an awesome script, your instructions are superb. I’ve followed it all and the feed works fine, but from time to time (about 20% of the time) I get the following error: ‘connection problem. Check file path and www vs non-www in getJSON request.’
Is it because I’ve put the js in the head of the document and users are trying to navigate the site before the feeds loaded?
Many thanks
Neil
the fading tweets post is not working for me..why oh why π
hi tom – really great you helping aspiring developers like myself =)
quick question – per your instructions, ‘along with the twitteroauth library to a folder on your web server’
if im using symfony, which specific files do i need to load on my web server? im assuming all the php files under src/entity?
thanks dude
Is it possible that this tutorial doesn’t match with this new update?
[link outdated]
My Twitter feed broke as of today, and I am only getting ‘null’ when running get-tweets.php.
It seems to be connecting over https (if I check the code), but I don’t know if that is enough.
Any ideas about this?
Hi, nice tutorial, I wanna know that if this limit of 180 per 15 min is based on each user who signed or for all the users of that application
Typical that this doesn’t work for me. As far as I know, I followed this tutorial correctly. But when I want to fetch my tweets I get no output.
I do hope you still read the new comments and I hope you can push me in the right direction.
Kind regards,
Dirk
Hi Tom,
I was able to get some information to post to my site, but I’m not sure what to make of it. I don’t know if this is actually the expected output or not, but each of my tweets is preceded with “Twitter for iPhone“,”truncated”:false,…….” I just don’t know if this is random mess of data is what I should be using to style. Link to the code is here… [removed] I also included phpinfo(); at the bottom so you can see my info. Any help is appreciated!!!
Hi Tom, How can this be done using asp.net instead of PHP script?
Hi Tom, thank you for the code, I’m impressed by the explanaition you gave that enabled me to make it work.
I’m using your code in a student project, where I additionally need to save tweets to database (actual tweet + screen_name). I’ve managed to access the text of tweet with this code:
statuses as $trend )
{
echo “{$trend->text}n”;
}
?>
but I can’t access the screen_name. I’m completely new to JSON, not sure how to request it (asking for screen_name instead of text didn’t work).
Hope you can give me some hints:)
Thanks for this post. It helped me a lot and saved my time.
hey there,
I’m getting this error when I’m trying:
Parse error: syntax error, unexpected T_VARIABLE in C:localhostwwwtwitter-1get-tweets1.1.php on line 6
the path to the twitteroauth file is all fine but still I’m facing this problem.
Hi!
I’m getting this {“errors”:[{“message”:”Invalid or expired token”,”code”:89}]} but tokens are correct.
Getting the follow error when trying to run script
{“errors”:[{“message”:”Could not authenticate you”,”code”:32}]}
First of all this is great tutorial, thank you very much. Second; I read that this method must return up to 3,200 of a user’s most recent Tweets but i have just received around 190-198 tweets. What is the problem ? what do you think ?
hi tom.
i have created app on twitter.
my website is ready.
i also created php file.
but i dont know how to add these all things to my home page and where to add in html.and how to call these all things.
thanks for your help.