I’ve just committed a couple of changes to my php2Bluesky library based on suggestions and/or code provided by others. These are:
- new function, permalink_from_response, which will return a permalink given the response from post_to_bluesky (@BobaFettFanClub)
- you can now provide your own image for a link card just include the link in post_to_bluesky (@bearlydoug)
- start of some error checking
Clearing Some Confusion
I have also received some feedback that the blog posts written when I was first investigating posting to Bluesky are confusing if you are only looking to be able to use the library itself. Looking at them again I can see the issue – the blog posts are more about how I wrote the library and not how to use the library.
With this in mind I have now amended all of the blog posts to have the following disclaimer in a yellow box at the top:
NOTE: This post is mainly about how I developed the php2Bluesky library. If you are looking for information on using the library in your own code please see here: https://github.com/williamsdb/php2Bluesky/
I have also updated the README to include more examples on how to use the code and I will remove the links to the blog shortly. I am also going to take a look at Github’s wiki functionality to see if that might be a suitable place for more detailed documentation.
Hopefully, this will address the issues that people have encountered. Every day’s a school day!
What’s Next
There are several things that I am going to work on next including:
- checking for when the post text is more than 300 characters
- allow default behaviour for when a link card has no associated image to be set
- better (some!) error handling
- moving to Composer
- better documentation
- uploading other media types (once the API allows it)
If there’s something that you would like me to consider the please raise an issue on Github.