Added calculation logic for Facebook