There are several ways you can add the Twitter and Facebook buttons to your blog posts so that people can easily share your artciles or blog posts. One of the easiest way to add the following php code in to your page.
1. In Drupal, make sure you have enabled "PHP filter" in your module section.
2. Create a new block for Twitter and Facebook section
3. Add the below php code in the body as "Source" in case you have wysiwyg editor enabled
4. Select the Text format as "PHP code"
5. Save and add the block in your blog section.