combining code for Twitter and Facebook, hope this works