I notice some people share their gig into facebook group comment box. is it legal ?
You will not be popular if you do that. The groups consider it spamming
That is link spamming, it is going to affect your reputation on social media.
Only post gig link when someone asks for your service or how they may you.