I had a requirement to export all my WordPress blog posts into a nicely formatted PDF file and so I looked at plugins that were available to do the job, of which there are a few. I tried some and none worked for me giving no output at all so I decided I would roll my own. Here’s how you can use that code to download your posts to PDF too. You can see an example of the output at the bottom of the post.
Since Elon Musk took over Twitter things have been, how can I put this politely, a little unstable. Then, last Friday, the platform started to limit the number of Tweets that you can view. At the same time that this change was implemented my calls to the API stopped working returning the following:
stdClass Object ( [errors] =Array (  =stdClass Object ( [message] =Sorry, that page does not exist [code] =34 ) ) )
Searching online turned up nothing much about this specifc error message and nothing recent either. I spent a bit of … Read the rest
In the first part of this post, I showed how to set up your Twitter dev account ready for using v2 of the API. In this post, I will show you how to access that API and post a tweet.
I am moving from Codebird which has been great but only supports v1.1 of the API. I looked at all the PHP libraries that I could find and decided on TwitterOAuth which styles itself as the “most popular PHP library for use with the Twitter OAuth REST API”. I toyed with this package but couldn’t get it … Read the rest
As part of The Twitter Debacletm I have spent the last few weeks trying to get my Twitter bot working again which has taken quite a bit of effort.
I thought it might be worth looking at what I did to get my bot working again once access to the API was cut in February. As there is so much in this I have broken it down into two parts:
- setting up your project and getting the keys you require to use the API
- calling the API from PHP
Getting the keys
I struggled to find which keys to … Read the rest