generate the fb button in function