Generally, the faster a business responds to comments the better. So if someone puts up a compliment, sincerely thank them for it as soon as you can.
Similarly, if they make a genuine complaint, respond quickly with thanks, an apology and a promise to make things right.
Be open, polite and professional, not cold or defensive. Remember that their complaint is a sign they value your product or service.
It’s important then to move the conversation onto a private channel – e.g. Facebook Messenger, email or phone – so that you can get to grips with the problem without discussing every detail in public. Then do all you can to solve the problem.
Once the issue is resolved, go back to the original comment and ask the person publicly if they are satisfied. This shows your customer and others that you made good on your promise, and that you value them.