Post on facebook when I publish blog

As Robert hue said, you’ll have to use a plugin for this. There are plenty in the Plugin directory, but you could also write your own plugin (or add the code to your theme’s functions.php file) if you can’t find a suitable one or need more functionality.

You’ll want to hook into the publish_post action.

For example:

function publish_post_to_facebook($ID, $post) 
{
    // Use the $post object to get information on the post, such as
    // the post_title

    // You could use the $ID of the post to generate a permalink,
    // i.e., get_permalink($ID)

    // Here would go your code to connect to Facebook and share the
    // the post. You would likely need to use a Facebook PHP SDK
}

add_action( 'publish_post', 'publish_post_to_facebook' );

Remember, in WordPress nearly everything is a type of post (including pages). You’d probably want to check that $post->post_type == 'post' (or your custom post type, if you’re using one).

There’s an example of the publish_post hook being used in the Action Reference in the Codex.