calculate facebook data in the algorithm