We can do this in two ways.One with Jquery and other with CSS.
With CSS :
Change the position value to fixed or absolute.And adjust the values for Top Bottom,Right,Leftscroll facebook box with page scrolling
Check this link.
Another with Jquery : http://www.jqueryrain.com/2012/01/35-best-jquery-social-bookmark-tutorials-and-bookmark-plugins/
You can find lot of tutorials in google.
Hope this will help you...