Reading the help section, you can find the How do I write a good answer? page.
It explicitly states:
Provide context for links
Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.
As you can see, it says to "always quote the most relevant part [...]", which you didn't do.
I believe this may have been why the answer was deleted, as I see no other reason for it.
FROM HERE ON NOW, THIS IS PURELY MY OPINION
Currently, these are the following flags for answers:

Your answer is more fitting as a comment instead of an answer.
You did try to answer, but you didn't put the juice of the answer in the answer itself.
That's like asking a question and putting part of the code on pastebin.
As a comment, I think this is fine. As an answer, I think this is a link-only answer and provides little value, in it's current state.
You probably can have it undeleted by adding the "missing content" (code sample as well).
You don't need to copy-paste the whole entire content of the link. Just describe the process in simple and easy terms.