Collect types publish action

I want to create a plugin to send data to twitter after the collection type is published/updated( eg. article). Is there any way to do that?