Trying to implement facebook functionality