Try implementing shareThis on your website. It's a system which communicates with all social networks' API to allow you to share content.
Yeah, Share This is probably the easiest way to do it. If you want more direct control you're going to have to implement the Twitter and Facebook API's directly. For that you'll have to sign up for each service's API access and check their documentation on how to implement it. There may be some PHP scripts already made that do the implementation for you, but I don't know of any off the top of my head.