fix the logic with facebook logic