.Skip to main content
@skddc Sch...ade... mastodon plugin should put ... + a link to your post at the end if you pass the 497(link) characters.
Good news: my KnownMastodon plugin works. Right now only for Status. Let me tidy it up and I'll push it to https:/
I hope we will have a KnownMastodon plugin this night...
Seems you fixed the like plugin in a way (likeception). Let us know how.
Seems you fixed the like plugin in a way (likeception). Let s know how.
2 min read
I was looking for a way to import my twitter favourites. First I was thinking about writing a plugin that checks the twitter api for new likes, but no one ain't no time for that.
So reading about IFTTT again, I wanted to give a try as the maker channel seems to fit as it let's you make web request to a publicly accessible URL. No luck with the Known API, it needs some custom http headers.
So I wrote a quick and dirty request forwarder : KnownApiForward. It takes the request from ifttt and passes it to the known api.
The Known documentation is still a bit poor and one has to get the pieces together if you're not familiar with it.
What you need is :
your endpoint (your_known/action/edit in my case for a status https:/
your api key (account settings -> tools).
Calculate the token :
$token = base64_encode(hash_hmac('sha256',$known['action'] ,$known['known_api_key'] , true));
Headers for the curl call :
$known['headers'] = array('Accept: application/json', 'X-KNOWN-USERNAME: ' . $known['username'], 'X-KNOWN-SIGNATURE: ' .$known['token'], 'Content-Type: application/json', 'Content-Length: ' . strlen($known['status']));
And the curl options :
curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookiefile"); curl_setopt($ch, CURLOPT_URL,"YOUR_KNOWN_SITE_URL".$known['action']); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $known['status']); curl_setopt($ch, CURLOPT_HTTPHEADER, $known['headers']);
In IFTT, create a recipe with the Maker Channel. Provide the script's url and put a json formatted text in the body field :
1 min read
I just have uploaded my new plugin for my Known site : https:/
It adds up to 5 stars to any article by simply adding a hashtag ratingstarsX where X is a number from 0 to 5.
It's based (and the code is mostly copied) on the work of Felix Schwenzel (@diplix) who recently has added this to his posts.
There's another plugin which adds reviews and ratings to Known, but this plugin creates an entity for its own, and is more designed for product reviews.
The hashtag ratingstars will be hidden so you wont see it on any post.