125 comments found.
Thank you for you work. But i have this message when i want to use it :
Fatal error: Uncaught exception ‘TwitterException’ with message ‘the following errors were reported by Twitter – Could not authenticate you.; code 32.’ in C:\wamp64\www\twitter\src\ultimate.twitter.feed.php on line 573
TwitterException: the following errors were reported by Twitter – Could not authenticate you.; code 32. in C:\wamp64\www\twitter\src\ultimate.twitter.feed.php on line 573
Can you help me ?
Thank you ! 
Sorry i had some trouble with the keys, but now :
( ! ) Fatal error: Uncaught exception ‘TwitterException’ with message ‘the following errors were reported by Twitter – Sorry, that page does not exist.; code 34.’ in C:\wamp64\www\twitter\src\ultimate.twitter.feed.php on line 573
( ! ) TwitterException: the following errors were reported by Twitter – Sorry, that page does not exist.; code 34. in C:\wamp64\www\twitter\src\ultimate.twitter.feed.php on line 573
Hi Lyre!
Sorry for the late response.
According to Twitter’s documentation (found here) code 34 means that the specified account or list doesn’t exist. Can you make sure that you entered the username correctly in the options?
Really good job here, all works really well – thankyou! Just one issue – I need to add target=”_blank” to the link generated in the feed (to open new window when clicked on the tweet link). Is this possible? Thanks
Hi nicshar,
You sure can! You can set the option format_link to change how links are formatted in the output.
The default value is
<a href="{link:expanded_url}" class="link-tweet">{link:url}</a>
Something like this should suffice
<a target="_blank" href="{link:expanded_url}" class="link-tweet">{link:url}</a>
Here’s the list of all options available
http://austinbrunkhorst.com/demos/twitter-class/#optionsI get this error. How to correct it?
[19-Jun-2015 01:57:24 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/clients/client1/web1/web/utfc/ultimate.twitter.feed.php on line 742 [07-Sep-2015 01:25:37 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/clients/client1/web1/web/utfc/ultimate.twitter.feed.php on line 742
Hello, is it a bug? How to repair this?
Hi there,
What do your class options look like?
I have not changed the default options except this one ‘cache_dir’ => ‘utfc/cache/’,
If I keep the default ‘cache_dir’ => ‘cache/’, your software will create the cache folder on the web root.
I see. This bug is a result of Twitter unexpectedly returning null as a response to an API request. It seems to have to do with HTTPS connections. If you email me at contact@austinbrunkhorst.com I’ll send you an update that accounts for the null response so that you don’t have to wait for the update on CodeCanyon to be processed.
OK, sent. Thank You.
It seems working but still needs more time to observe. And where is the option curl_ssl_verifypeer? I can’t find it in the config file.
The option curl_ssl_verifypeer is not documented. It’s simply forwarded as an option to how requests are made with CURL to the API endpoint.
My site catches another error related to this software. I’ve sent the log to your email address. Please check.
Hi, first of all I would like to say you have made a great plugin. I have just a small issue with the number of tweets retrieved. I have only 15 tweets and in my Twitter timeline I have many more. I have set cache_life to 60 and play with the var count, but can’t get this works. Can you help? Thank you Best regards Tanguy
Hi there!
If you make changes to the count option, you must delete the cached tweets before the updated results will be displayed, otherwise they won’t be displayed until the cache is out of date (based on the cache_life. This is because the tweets cached are respecting the options you used when they were cached.
Is it possible to check for a valid twitter user, before displaying their feed?
Hi there,
This class wasn’t designed to query for this type of information.
One possible solution, rather than checking specifically if the user is valid, is to check for errors in general. If there is an error you can assume something went wrong with the request (i.e. the user isn’t valid). Display “unable to process request”, rather than “the user is invalid”.
The code required is a try/catch block.
try {
// do setup, etc. ...
$twitter->PrintFeed( );
} catch(TwitterException $e) {
// there was an error. Nothing will be printed if the exception occurs.
}
Hello, I am getting an error: Fatal error: Uncaught exception ‘TwitterException’ with message ‘the following errors were reported by Twitter – Could not authenticate you.; code 32.’ in D:\xampp\htdocs\payoff\sections\src\ultimate.twitter.feed.php:573 Stack trace: #0 D:\xampp\htdocs\payoff\sections\src\ultimate.twitter.feed.php(545): Twitter->apiMakeRequest(Object(tmhOAuth), Array) #1 D:\xampp\htdocs\payoff\sections\src\ultimate.twitter.feed.php(448): Twitter->apiLoad(Object(tmhOAuth)) #2 D:\xampp\htdocs\payoff\sections\src\ultimate.twitter.feed.php(189): Twitter->loadRequest() #3 D:\xampp\htdocs\payoff\sections\feed.php(19): Twitter->PrintFeed() #4 D:\xampp\htdocs\payoff\index.php(37): include(‘D:\\xampp\\htdocs…’) #5 {main} thrown in D:\xampp\htdocs\payoff\sections\src\ultimate.twitter.feed.php on line 573
I have the same error when I try it on a server
Please advise…
Hi adequay,
Can you verify that you have the correct consumer key, consumer secret, user token and user secret entered as options for the class? This error suggests that you may have entered them incorrectly.
You can find information about getting these values here.
Hello, yes I entered the correct values and also set the twitter app access to “Read, Write and Access direct messages”
Can you show me how you’re setting up and using the class? Make sure you omit the private keys for your security.
Hey, my css is not working with bootstrap. which classes i need or what i have to change? Thanks! http://3etage.de/ligareport/
Hi there,
I’m not sure what your desired results are, but you can change the format option to change the class each tweet has.
By default, the container of tweets has the class name tweet-container, so it might be easiest just to style based off the parent selector.
You can find more information about options here.
I changed.. nothing. i only put your code.. this is the code. What i have to do to use your css style? I want the CSS List you have (Multiple Screen Names ) in your examples.
http://www.3etage.de/ligareport/c.txtplease delete
Question: Is it possible to add {tweet:relative_time} in „Multiple Screen Names“ ? thanks!
Have you tried it? There shouldn’t be any issues with formatting for multiple screen names.
yes worked. thanks. last question from my side
Is it possible to ecxlude retweets?
Very poor support. 18 days since I asked a question, and no answers.
Hello,
I need to tweet first and then show the twitter feed in my landing page. Is this posible with your code.
Thanks in advance.-
Hi there,
Can you elaborate a little bit more about what you mean?
I have to say that the installation instructions included with this script are really quite obscure, and I’ve installed hundreds of php scripts without a problem. It’s like if you take for granted that we understand the logic behind the script and it all seems very obvious to you, but we’re not supposed to be php coders!
Let’s see: 2 . “In this zip, you should have the folder src/. This includes the Twitter class as well as other files needed in order for this script to work. Copy that folder relative to your php file. Finally, include the class.”
Copy that folder relative to your php file?? what does that even mean?? What do you mean by “include class”. Include the class where?? You mean in our index.php file??
3. construct class. (...)
What exactly do you mean?? do you mean that those lines should be added to the main css file? a different css file? that the ultimate.twitter.feed.php should be modified adding that line before it’s uploaded?
Hi Lakehache,
I understand that some of these instructions may be ambiguous or difficult to understand.
It’s also important to understand my perspective as an Author of a PHP script. If you’re interested in buying a script that fulfills a certain set of features or requirements, it would only make sense that your knowledge of PHP or programming in general at least touches the surface, or you at least have resources to understand/learn them to lowest extent.
Let’s say you bought a sports car with a manual transmission, but only had experience with an automatic transmission, so the vehicle was very difficult to drive (at least initially). Would you be frustrated with the company in which you bought the car from? This is at least the way I look at it.
With that said, I’ll provide more details in the instructions when I get a chance (as I’m sure you’re aware, I’ve been extremely busy).
Thanks for your reply, Austin. It’s not the first time users have told you that your installation instructions are very poor. I’ve searched the internet, and other people have accused you of the same thing, but it seems that this doesn’t worrry you in the least. You are, without a doubt, the first coder that I’ve EVER come accross that doesnt’ even mention which files you’re supposed to edit. I have installed more than 200 php scripts in my life and far more complex than yours (I can compile details if you request them: Ikonboard, IPBoard (with dozens of independent subscripts), phpbb, machform, many of phpjabbers scripts, innermail scripts, game scripts, etc. etc.). In my opinion, I doubt you’ve ever read the installation instructions to another php script in your life. It’s sad to read you saying how little time you have to improve the instructions but do find the time to reply to my post . “You do understand that the instructions are a little ambiguous” and yet refuse to do anything about them?? a rather peculiar business approach if you ask me. As I said, I’m sure youre a brilliant coder, but it’s really sad that you seem tgo enjoy making your instructions a puzzle game (do you actually enjoy knowing the trouble people will go trhough trying to put together your script?) And please don’t put users down or challenge our intellectual capacity simply because we have trouble understanding your criptic instructions. It’d kind of adding insult to injury…
Hi Lakehache,
I would like to preface this by saying it wasn’t my intentions to put you down or challenge your intellectual capacity.
I’m just taken back by how thoroughly upset you are about the way I described the installation steps.
This is a single file, single class script, not a large suite of software like the ones you described. I’m selling the functionality in this class, and that’s it.
Because of this, technically there are no “installation” instructions, you simply use the class in any context that you would like. The current instructions exist as a guide to deal with the files included in the zip. Any further, and I would quite literally be describing the semantics of PHP.
Describing the semantics of php??? why can’t you just name the files that we’re supposed to edit like everyone else does? please grab ANY php script at sites like hotscripts.com (most of them are free) and take a look at the instructions. They ALL give you basic instructions on which files to edit. ALL without exception.
I asked some very simple questions:
1: In this zip, you should have the folder src/. This includes the Twitter class as well as other files needed in order for this script to work. Copy that folder relative to your php file.
Which php file? do you mean index.php? because I have many php files in the directory where I will be installing this script. In this zip, you should have the folder src/. This includes the Twitter class as well as other files needed in order for this script to work. Copy that folder relative to your php file. Finally,
2: include the class.
Include it where?? a class could go anywhere. On the index file, on one of the many css files, where??
3: Next, we’re going to construct a new instance of the Twitter class. The example below shows the options required to be passed into the constructor function. You can find where to get your keys in the first step.
Which file are we supposed to include the class in??
4: print a feed ????
WHICH FILES ARE WE SUPPOSED TO EDIT??
Again, this is a class, not a file that you just edit.
The steps are describing what you would do to an existing file that you’ve already created.
With all the steps together, here’s what your file might look like.
<?php
require_once 'src/ultimate.twitter.feed.php';
$options = array(
'screen_name' => 'MyScreename',
'consumer_key' => 'CONSUMER KEY',
'consumer_secret' => 'CONSUMER SECRET',
'user_token' => 'ACCESS TOKEN',
'user_secret' => 'ACCESS TOKEN SECRET',
);
$twitter = new Twitter( $options );
$twitter->PrintFeed( );
?>
Just as question. The read.me file says: “As of January 14th, 2014 – Twitter requires all API requests to use a secure connection (HTTPS).” Does this mean that if my site is not SSL (i.e. I have no SSL certificate, etc.) the script won’t work?
Hi Lakehache,
This means that when sending a request to Twitter’s API, you must use the HTTPS protocol instead of HTTP.
This doesn’t actually require any action/extra steps from those using this script, as it handles all of that in the backend (aka, you don’t need a certificate).
The file src/cacert.pem simply contains a list of trusted root certification authorities, so that when making an HTTPS request, libraries used in this script can verify that the responses are from who they say they are.
Hi there, I seem to be having some problems with this plugin
I am getting two warning errors they are:
Warning: mkdir(): Permission denied in /Users/Barry/Sites/wiganwarriors/src/ultimate.twitter.feed.php on line 145
Warning: file_put_contents(cache/1.1-statuses-user_timeline.cache): failed to open stream: No such file or directory in /Users/Barry/Sites/wiganwarriors/src/ultimate.twitter.feed.php on line 661
I have set the src folder and ultimate.twitter.feed.php to 777 and added a cache folder inside the src folder with permissions of 777 also but still receiving this error.
Please help
Hello,
This seems to be a peculiar issue with your hosting environment, as this script doesn’t do anything special with file/folder creation.
I suggest looking at this StackOverflow post for possible solutions.
I now only get this warning message :
Warning: file_put_contents(cache/1.1-statuses-user_timeline.cache): failed to open stream: Permission denied in /Users/Barry/Sites/wiganwarriors/src/ultimate.twitter.feed.php on line 661
Is possible to retrieve more than 20 tweets from user timeline?
Hi there,
You can change the count option to the value you’re interested in.
Note that the maximum number of tweets you can request at one time is 200. You can find more information about that option on Twitter’s Docs.
Hey,
I also get “Warning: array_keys() expects parameter 1 to be array, null given in /twitter/ultimate.twitter.feed.php on line 742” as a reponse. I definitely use the correct Keys and Access Tokens.
Any ideas?
Hi Snowman,
Delete your cache folder and try again. If this doesn’t work, email me the code you’re using to setup the class.
Hey,
thanks for your reply. I did that (deleting cache folder), changed PHP version and also tried it on a different webserver. Since it’s the first time for me, working with twitter, I would really appreciate your help. I am going to send you an email.
Thanks in advance, best regards
Hi, I’m trying to remove the media url that Twitter places at the end of tweets when I embed an image. I’m detecting media w/ a callback like your example and tried to blank out the ‘format_link’ like:
$options = array( // other required options // ... ‘format_link’ => ’’ );
Which doesn’t help me – I want to keep the links in the tweet (which it removes) and it still does not remove the media url at the end. Any help would be appreciated.
Thanks!
Hi mako,
There is an option format_media which targets media entities in a tweet. Setting this option to an empty string like you were trying with format_link should accomplish your goal.
The documentation lists the other available options, including other specific format specifiers.
Awesome, thanks for the quick response.
The Tweeter area is above the footer area. Currently, it is only a demo with dummy links and feeds.
Hi there,
this script will indeed work, all you need to do is set the count option to 1.
It works out of the box! Great Software! I can display tweet by <?php $twitter->PrintFeed(); ?> but how do I display my tweet name and link?
What do you mean by name and link?
Hello Austin, you can see my tweet area on the footer area: http://2vpn.co/ I place <?php $twitter->PrintFeed(); ?> to display tweet but this code pushes my Tweeter screen name (manually inserted) to the end of that line. So I hope your software can display my Tweeter screen name automatically before the tweets. It will look better. Is it possible?
The original code is:
2VPNCo<?php $twitter->PrintFeed(); ?>
I can’t seem to get the Live Search Ticker example to work, it just displays blank, thanks
Are any error logs generated by PHP, or are there any errors in the JavaScript console?
I purchased this a few days ago. Did rate 5 stars for the code quality and functionality, but also want to enocurage everybody else to purchase this instantly.
You won’t be able to find any Twitter class for free out there that is this functional. I spent a couple of days searching for proper class, ended up extending it to suit my needs.
A couple of days I came across this Twitter Class from Austin Brunkhorst and I am quite much satisfied. It has everything I need, even stuff that I don’t need at this time, but might need in future.
It’s very hard to find quality classes on Codecanyon, I got screwed many times by spending a couple of bucks on some classes but they weren’t as quality as I thought they would be. Plus on the other side many developers create and abandon their projects.
I just wish if Austin would consider making more classes that would be useful such as caching, mysqli, pdo, compressing, social locking, referral locking etc. Just some examples.
Thank you for quality work and good luck with your sales!
A++ RECOMMENDED CLASS, no regrets!
dvLden,
I deeply appreciate your kind words and am glad this script worked out for you.
I plan on publishing more potentially useful things for CodeCanyon in the future, but I’ve been really busy with other things. Hopefully I can get around to it soon!
getting this error Warning: array_keys() expects parameter 1 to be array, null given in /home/content/ultimate.twitter.feed1.php on line 742
Hi metro1,
Does this behavior occur every time the script is run? I suggest making sure that your API keys are correct.
Does this still work with Twitters current API? Also, am i able to combine multiple Twitter accounts in to one feed using this? Thanks