Here is my app's code:
However, I get this error:
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It only takes a minute to sign up.Sign up to join this community
From the documentation:
Apps must have a registered Stack Apps post to write.
The next sentence (about links pointing back) is no longer true, but the one after that is right and important too:
You can add or change your app's registered post from the Stack Apps App Management page.
Since this question is tagged app, you can use this one as the registered post, even though officially you should use another one. For testing purposes, it's fine I guess.