@poshbot has been running for a little over a day and a few issues came up and I had to speed up resolving another feature I wanted to add in the near future.
In short, @poshbot will automatically discover any tweet that includes a link to Hive content and leave a comment with the tweet for the author. The tweet does not need to include #hive or #posh tags and doesn't even have to be your own content. Not only does it allow you to get your posh on with half the effort, you will be automatically notified if someone tweets about your content.
How does it work?
I can tell you about the bits and bytes, but in short...
Here is the general workflow:
12|poshbot | Got Extended Tweet Full Text 12|poshbot | Found Tweet: https://twitter.com/ResilienciaHODL/status/1304195042639216642 12|poshbot | Base URL is: https://t.co/7HPxDXvZqE 12|poshbot | Processed URL: https://peakd.com/hive-126009/@resiliencia/testing-the-liquidity-pools-of-uniswap 12|poshbot | Extracted Permlink: @resiliencia/testing-the-liquidity-pools-of-uniswap 12|poshbot | Leaving Comment on @resiliencia/testing-the-liquidity-pools-of-uniswap for tweet: https://twitter.com/ResilienciaHODL/status/1304195042639216642
So what's new?
A lot of what I discovered in the first 24 hours is I need to add some error checking in some key areas to prevent the bot from shutting down to unhandled errors. I knew this would happen as I had a few areas I wasn't quite finished yet, but I did run into a few edge cases I had to deal with.
One such edge case was when someone tweeted links and immediately hit return, this would create a new line character '\n' that would get combined with the link, so I would properly detect the Hive link, but when I went to process it on the Hive side it would get mixed up. I already had some logic to clean the URLS at the beginning and end to remove some characters like punctuation and hashtags. I didn't want to assume users would always put links with proper spacing, this allows me to capture more links than I could without it.
Another issue was @guiltyparties link shortener, this was on the list of things to support but I didn't have it in release 1.0 because it involved following multiple redirects. Normally when you tweet, Twitter will automatically create a shortened link. For example, someone tweeted my introduction post and twitter made the link
https://t.co/XDrBayZNcM, so it makes it trickier to monitor the Twitter feed for Hive content, but I also then have to follow the shortened link to the final post so I know where to comment. This is fine, it was rather easy, barely an inconvenience. If you tweet a bit.ly link (or a myhive.li link) the resulting link is just another redirected link. These redirected links don't always result in a 301 status code that represents an HTTP redirection. These links just return a 200 "everything is ok" message.
This was a problem I was planning on solving but as bit.ly link and other link shorteners are fairly rare occurrence, it wasn't a priority. I had a few requests to support HiveURL.com links, so I went to work on it right away.
@poshbot will now automatically detect HiveURL shortened links (myhive.li) and properly follow them down to the actual Hive post and leave a comment.
As of right now, @poshbot will automatically detect links to the following services:
- HiveURL Links (New)
Want to give @poshbot a try?
My favorite thing about @poshbot
While the main goal of @poshbot is to save time and allow you to show your POSH (Proof of Sharing), my favorite feature is being notified when someone else tweets your content. Most of the time you don't even know this happened. Now you do!
Is @poshbot being used?
In the first 24 hours, @poshbot has already provided over 750 notifications!
The posh is strong on Hive.
Anything else coming?
I have a few ideas for @poshbot that I may follow up and actually do. You will be the first to know if I do.