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]
The final stages of the transition from v1 to v1.1 of Twitter's API went fully complete 11th June 2013, however there's still a fair few people using v1 of the Twitter API and moaning that it's not working. Well obviously it's not going to work now as it's been totally switched off.
However updating to use v1.1 of the API is very simple.
Now before I start rambling on about how you can do things, I would like to point out that I am using Abraham Williams' Twitter OAuth class for this post (as it's the first and main one I've came... [read more]
This is plagiarism at its finest. I read the article this was ripped from. KTX bye...
somebody troll (9th January 21:05)
Happy New Year
I have a problem...
I can not download images...
Help me please :-(...
Imanol (5th January 01:00)
A bit late, but thank you!...
user (2nd January 20:27)
IIRC... WHAT YOU ARE TALKING ABOUT IS NOT USEABLE IN WINDOWS...
Users (15th December 21:06)
Hi super Dale, am sunny from Nigeria, I just come across this your tutorial, pls I need your help on something serious and precious to me. I will be glad if you can be of help. It's about separating p...
Sunny (14th December 19:46)