put the code for post in FB and Twitter in one unique method.