4.1: Mastodon Bot – What is Mastodon?

(bell dinging)
– Hello this is a first video in a new series about
making a Mastodon bot. And you might be asking yourself, okay, why are you
making, what is Mastodon, why are you making a Mastodon bot and why should I care? (laughing) I'm not really
sure why you should care but I'm going to try to
answer those other questions and you yourself can decide. So this playlist is
essentially a replacement for Session 4:Twitter API
and Bots with Node.js. So I'm going to not redo 15.1 and 15.2 if you have never used Node before or don't know what NPM is, you can go back and watch those two videos, but I'm going to start here
basically with setting up, setting up a Twitter,
setting up a Mastodon.

And so what is Mastodon, why are we here? So the Twitter API, which I used to create these set of tutorials,
recently changed quite a bit. So it is much harder to
signup for a new account authorized for automation, making a bot that posts in an automatic way to Twitter. They also changed something about the API called the streaming API,
the way that you could connect to Twitter and
listen for certain events. They changed the API and
that is no longer available. So while I encourage
you to still experiment with Twitter as a platform if you so like. If today is your first day wanting to like learn some stuff about
node and social networking and making up social networks
and making a bot that posts, Mastodon is going to
be a more pleasurable, easy-going experience for
you that's going to allow you to express your creativity
in a much more immediate way. And then there's another reason.

It has to do with this idea
called decentralization. So Twitter, I don't
know if you've noticed, it's kind of an awful place
to be for the most part, I don't want to get too
far down that discussion, but is there, is there another way? Is there another way
that we can communicate with each other in a
less centralized governed and owned by large
corporations kind of way. And one way to do that is with a concept called decentralization. And Mastodon is an
open-source, I don't know maybe I should go somewhere
where it actually says what it is, well you can read it, Follow friends and discover new ones. Publish anything you want
link, pictures, text, video. All on a platform that is
community-owned and ad free. You know this is not like
some sort of sponsored video I'm experimenting with this platform because it interests me and
maybe it'll interest you. It is open-source project. You can see it's on GitHub here and the decentralization runs with a protocol called ActivityPub.

So let me try to give you an understanding of what I mean by all this stuff. What is Twitter, I don't know if anyone should really answer that
question but (laughing) I will give you a little framework. So Twitter is a company, they
run probably a lot of servers. You can be sitting on your
laptop or your, you know, phone, that's a phone apparently, and you could sign up for
an account on Twitter. You could give yourself
a Twitter user name like @shiffman and then
you could post messages like the heart emoji and
you can read other messages that other people are
sending into Twitter.

This is what you would refer
to as a centralized platform. The software that runs Twitter is on a particular
server, it's proprietary. The way Twitter is governed in how, where, what certain posts are
allowed and aren't allowed are all run by this same company. And all of your data, all of the tweets you've ever posted, all
of your user information, your password stuff, all of that is stored on this centralized server. The web didn't start with this idea of a centralized platform, the idea was many different nodes all interconnected, being able to share and
publish with each other. And so there is, slowly
entering the Zite guys now, this idea of decentralized platforms. Probably if you're not familiar with that you're probably familiar with something called Bitcoin, right,
which runs on something called blockchain which is a protocol for decentralized financial transactions which I am not going to
make any videos about at least anytime soon. But, Mastodon is an open-source, decentralized social network
and it probably resembles Twitter the most but
there's some nuance to that.

So how is it different? How does it work? Well number one is there
is no single server. For example I have actually
set up my own server known as an instance. And I'm not going to
show you in this series how to set up your own Mastodon instance, but if that's of interest
I certainly can provide some resources to do that
and I could do a video about setting one up. My instance is at a particular
domain,, this is my Mastodon instance, so we'll call it Choo Choo. There are other Mastodon instances. For example,
there is also, let me erase some of this stuff here. choochoo,,
there are some other ones that I have seen, for
example, there is which is an instance for people interested in data visualization I presume. There is another instance
called which I am going to use in this series to make a bot that runs
on this So the idea here is I've
set up this instance. Let's say you want to
sign up for an account with this particular instance.

You would go, I'll show
you to in a second, you would go there and you would sign up. And so my user name, I'm
a client, my like picture of my like laptop over
here which is strangely, it's a weird bizarre angle,
I am So this is my local, this is
my local Mastodon instance. When I want to sign on, when
I want to post something, I post it, a sign on through this server, I post it through this server, my account is with this server. But there is this concept
called federation, sounds like something out of Star Trek, and it kind of is, which federation, and I know I'm kind of getting close to writing off the top, is a way for all of these instances to communicate with each other in a decentralized fashion. So if I post something saying like, hello, I ate oatmeal for breakfast this morning, this post that I make through here will get propagated throughout the entire network of Mastodon instances.

Leave a Reply

Your email address will not be published. Required fields are marked *