Finally, the metric TRij (Trust Rate) indicating the degree of trust in user i from user j, is given by Equation (2): (2)TRij=DTij,if users i and j are direct friends ,ITij,if some friendship chain exists from user i to user j,NTij,if no friendship chain exists from user i to user j, where If users i and j are direct friends, Direct Trust (DT) is obtained using Equation (3) (3)DTij=dfij·wF+ari·wR.If some chain of friends from user i to user j exists, Indirect Trust (IT) is given by Equation (4) (4)ITij=F(i→j)·wF+ari·wR.If there is no friendship chain from user i to user j, Equation (5) is applied (5)NTij=ari·wR, where wF is called weight of Friendship, and its value (0.625) is obtained by the average happiness of people with their friends in the social network of Facebook ;wR is the weight of Rating, whose value is obtained using 1−wF, so it is 0.375;F(i→j) gives the degree of friendship from user i to user j obtained through the friendship chain {i,i1,i2,....,ic,j} between both. This value is obtained considering the probability of independent events. F(i→j)=dfii1·dfi1i2···dficj. This value is always between 0 and 1, and decreases along with the length of the friendship chain.