Depends what you mean by hacked. Often it's the case that someone just sets up a new profile in your name and using your photo. In that case you haven't actually been hacked, your own profile is still fine. It's just that some knob has cloned it. If your friends are getting new invites despite already being friends with you they can just report it as a cloned account (or you can search for it yourself and report it).
The point of this is that they pretend to be you, connect to your pals and then start messaging them with bollocks investment opportunities and stuff like that. So it's actually your friends that are at risk rather than you.
Ignore all the above if you have actually been hacked and they've got into your own account though.
Couple of tips to avoid issues in future are a) make your friends list private, that way the scammers can't see anybody to connect with and b) set up 2 factor authentication which means that no-one can log in to your account unless they have your mobile.