It is hard without more details to know if it was true spamming or not, but usually unless the information is requested and it is okay to post affiliate links on the website/forum then it is a big no-no to post your link there because it is technically spamming unless stated in the terms of service that it is okay. Now, if it stated in the terms of service that it was okay to do this and you still got flagged or marked as spam, then I would try to contact customer service of whatever website it was (we do not discuss other websites here, it is against FC terms of service so please don't post it) and explain to them why it was not spam if it clearly states that the action was okay.
I have to agree with the above post that it is truly best to have it on your own website.
I wish you the best of luck with this situation and hope it turns out okay for you.