|Number of watchers on Github||38|
|Number of open issues||1|
|Open pull requests||0+|
|Closed pull requests||0+|
|Last commit||over 6 years ago|
|Repo Created||almost 7 years ago|
|Repo Last Updated||over 1 year ago|
|Organization / Author||gajus|
|Do you use facebook-friend-rank? Leave a review!|
|View facebook-friend-rank activity|
|View on github|
|Fresh, new opensource launches 🚀🚀🚀|
Trendy new open source projects in your inbox! View examples
ay-fb-friend-rank (demonstration) is a PHP 5.3 class that can calculate who are the best user's friends. Data accuracy depends on the user activity and granted permissions. The only dependancy is Facebook PHP SDK.
All the data is collected in two batched requests. Nonetheless, it takes time for Facebook to prepare this data (sometimes up to 5 seconds). Therefore, you are advised to cache the data once you have it and repeat the query only if user has approved more permissions.
Follow the blog entry about the Facebook Friend Rank Algorithm to find out about possible implementations.
The following steps are taken to calculate the user ranking:
The applications looks through user's feed entries.
read_stream permission is required. However, if the latter is not given the app will rely on the public feed.
feed_likescore for liking user's feed .
feed_commentscore for leaving a comment on user's feed.
feed_addressedscore for addressing user in his feed, whether by posting directly on his wall or tagging the user in his post.
friends_photos permissions are required.
photo_tagged_user_by_friendscore if he tagged user in a photo.
photo_tagged_friend_by_userscore if user tagged him in a photo.
photo_likescore for liking a picture either uploaded by the user or a photo where user is tagged.
photo_commentscore for leaving a comment on a picture either uploaded by the user or a photo where user is tagged.
Friends. No additional permissions required.
friend_mutualscore for every mutual friend.
read_mailbox is required.
inbox_in_conversationfor participating in a mutual conversation with the user.
inbox_chatscore is given for every message in a duologue.
By default every action is valued 1. Every criteria can be assigned an individual weight using
setCriteriaWeight([action name, see $criteria], [numeric value]) method.
This class will become redundant once Facebook makes
communication_rank column publicly available.
SELECT uid2, communication_rank FROM friend where uid1 = me() ORDER BY communication_rank DESC LIMIT 10;
A similar attempt to calculate the friend index has been made by Mike Jarema using Ruby.
The BSD License - Copyright (c) 2012 Gajus Kuizinas.