Transitioning from Twitter API v1.1 to v2 (Part 2)

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.

Goodbye Codebird

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

Transitioning from Twitter API v1.1 to v2 (Part 1)

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:

  1. setting up your project and getting the keys you require to use the API
  2. calling the API from PHP

Getting the keys

I struggled to find which keys to … Read the rest

The Twitter Debacle

Ever since Elon Musk took reluctant control of Twitter he has been walking a tightrope as he balances bringing Twitter into the black with not losing the core base of users. That includes laying off a large number of staff.

One decision that I think he might yet come to regret is the change to the API access moving from free access to a freemium model. Where you used to be able to post an unlimited number of tweets this is now restricted – 1,500 a month for the free account, 50,000 a month for $100 and so on up.… Read the rest

Hyper Local Weather Part 2 (It’s not that)

A while ago I wrote this article about the box installed on a lamppost down our road. I surmised that this was a local weather station providing hyper-local weather, but that is not the case. Read on to find out what it actually is…

I was surprised to see someone up a ladder tending to the contents of the box this week and so I decided to go and find out exactly what it was all about. The person was happy to chat and explained that he was from the Transport Research Laboratory, contracted to the … Read the rest

Hyper Local Weather

I’ve spent years not really considering where our weather forecasts have come from. Other than having a vague sense of awareness that Cray Supercomputers are involved, that the forecasts themselves covered too great an area to be of any use and we’re frequently inaccurate. If you want to know the weather look out the window was my mantra.

Recently though apps have started sending notifications for weather warnings, such as rain starting in 10 minutes, for your “local” area. It’s unclear what area the warning covers and what they consider to be local but here in the UK you … Read the rest

Bringing Robbie the Robot back to life

A job that I never look forward to is mowing the lawns. Don’t get me wrong I love being in the garden and gardening in general. I think gardening is great for one’s mental health, but that does not extend to lawn mowing. So, a couple of years ago I bought a robotic lawnmower – a Flymo Easilife 250 – which we dubbed “Robbie”.

In order to get the mower to know where to mow you have to lay a wire around the boundary. This is a pretty straightforward job and you can either peg the cable down (in which … Read the rest

The LastPass Debacle

You will probably have read about the LastPass security incident(s) that took place last year and, perhaps, have seen the belated response from LastPass. Turns out a bad actor got access to an employee’s laptop by exploiting a weakness in the Plex media server software – something that had long since been fixed but the employee hadn’t felt the need to apply the update.

I am a long-standing LastPass user (since 2013) having long recognised the need for somewhere to securely store my passwords. Unsurprisingly I have accumulated quite a few passwords in those ten years – over 1,700 … Read the rest

Untethering a Raspberry Pico from your Computer

In my series on the PiHut Maker Advent Calendar, I posed a couple of questions:

  1. how do you move from a wobbly breadboard to something more permanent?
  2. How do you run code without having the Pico tethered to a laptop running Thonny?

I have, at least, now worked out how you do the latter of these two and I will explain how below.

In order to get a script to run on start-up you need to save a file called “main.py” to your Pico device. To do that I have included steps for this using Thonny. Firstly, make sure … Read the rest

The Kit I use for Recording Videos

If you have been following the PiHut Maker Advent Calendar series of videos I released at the end of last year you may have noticed that the videos changed in quality over the series. This was because I changed the setup I was using from a simple tripod on which the feet were visible to a gooseneck phone mount clamped to the desk. Finally, I added to this a light.

You can see all of this in the sort video below and then read on for what I used:

If you are interested in what I used this was as … Read the rest

Mastodon and verifying websites

Mastodon is all the rage at the moment as Twitter is driven into the ground in full public view by new overlord, Elon Musk. I’m not going to go into the pros and cons of Mastodon here but looking at one specific thing that is different to Twitter – the automatic validation of websites.

Getting your verification link

In the profile section Mastodon allows you to record up to four pieces of metadata. This can be anything you want, such as location or pronouns, and you can also record your website addess here too. You can put any link … Read the rest