Due to the recent events in Tunisia, our Prime Minister David Cameron has annouced that on Friday (3rd July) the country (UK) will fall silent for one minute to remember the victims of the Tunisian beach attack that happened on Friday 26th July.
Now whenever there's some sort of silence, I expect people to do it - all in all it's just a few minutes throughout the year that's taken by it. And by "doing the silence", I do actually mean DO THE SILENCE. No talking. No phone calling (unless obviously it's to the emergency... [read more]
I was working on some PHP stuff last night and decided to use the Phirehose library and when running one of the scripts, I kept getting this error:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\php\libs\phirehose\Phirehose.php on line 587
Now it obviously doesn't take a genius to understand the meaning of the error, for those that don't understand, basically in the settings of my PHP setup I have told it that if any script takes more than 30 seconds to complete, then time out... and that's basically what's happened here. So how do I... [read more]
So in the previous post in the Twitter Series, I covered how you can send a text-based tweet. Now in this post, I will show you how to send a tweet along with an image.
Now it should be noted at the moment that the PHP Twitter library we are using, Abraham, doesn't seem to support natively Twitter's "statuses/update_with_media" API call (neither did it in v1), however there are a few work arounds, some simple and some a bit complex, however for this tutorial we'll stick to a more simpler workaround. (Hopefully though in the not-too-distant-future, Abraham updates his stuff and... [read more]
You should now have the API running with v1.1, your application setup and your keys/secrets all together? Yes? Great, lets begin...
Hopefully your directory structure is currently like this:
+ Root Folder + twitteroauth - OAuth.php - twitteroauth.php
If so, then in the "Root Folder", create a file called "hello.php".
Now we will begin. At first we will need to assign all the keys and secrets as seperate varibles, like so:
<?php // Consumer key $consumerKey = ''; // Consumer secret $consumerSecret = ''; // Access token $OAuthToken = ''; // Access token secret $OAuthSecret = ''; ?>
Within the single quotes, you will need to put your values that're shown on your Twitter application's page.
Now... [read more]
Hopefully, you're all running on Twitter's API v1.1 now, as explained in the previous post.
Ok, right. So now to start things off, you will need to head over to the Developers section of Twitter and at the top click the "Sign In" option. Enter your login details as they are for Twitter normally, then you will need to authorise Twitter's Development page to allow you to continue, then once you've authorised it, you will be able to create your first application.
Once everything is authorised, you will be sent back to... [read more]