Hacker News new | comments | show | ask | jobs | submit login
Facebook Code Details "Ordered Friends"
2 points by derpenxyne 1873 days ago | hide | past | web | favorite | 34 comments
Right click anywhere on a Facebook page, click “View page source”, Ctrl+F “orderedfriends”, copy the first number below and add it to the end of “facebook.com/”. This makes me wonder what the meaning of these numbers is and why are they referred to as "ordered friends". Ideas?

Thought everyone might be interested in this - I did a little exploring (because it beats studying for exams). To the left of that list in the source code, there is a list called "privacyData" and after it is another string of user IDs, not coincidentally, all my friends (family members) I have blocked from chatting me or interacting. These ID numbers are listed as "13656xxxxx":-1, presumably assigning them a value of -1 each.

This suggests to me that the magic algorithm is assigning users a value from -1 to 1, with the more positive ones more likely to appear in chat. Between the privacy list and initial chat friends is this string of code: "ordered_list.available_target":0.85,"ordered_list.top_friends":5,"sidebar.min_friends":7"

This suggests to me that it's (1) searching for friends that have a value higher than .85, (2) always placing the top 5 friends from your initialchatfriendslist in your top half chat sidebar, and (3) always keeping at least 7 friends above the fold in the chat sidebar.

Finally, there's an input for "sound.enabled: true". Interestingly, after I turned chat sounds off, logged out and logged back in, it had not updated to "false" yet. This suggests to me that by monitoring when that flips, we can figure out how often the initialchatfriendslist is updated.

Yep, spot on. I had no -1s, then I blocked someone and they showed up.

Interestingly enough, under advanced options, you can also set it so ONLY certain people show up. I keep a list of girls I'm hitting on and sometimes only select them to chat with. Imagine my confusion when these were the only profiles listed under PrivacyData ;)

I don't view my number 3, like at all, even from the start of facebook, but she is my best friend and I'm on there like.. once every two months but there's this boy who is number 8 on mine and I view his more than once a day so he should be in my top 5. My number 2, I don't view that often but I know he has a huge thing for me, so I believe it is by most times they have viewed your page. My number one is my best friend and I know he views my page more than once a day because he told me so. So that is the only way I can think of how this works.. I'll just add a few more reasons in case you're wondering ~A boy who has recently started to like me, moved from 40 something to 20 something, and I don't view his page. ~Most people have stayed around the same, when ever I check, besides a few people ~A boy who I started to hangout with a lot, moved from 15 to 8. ~My top three are my best friends. ~I don't chat with my top ten the most, even from the start of facebook. ~my orderedfriends are not in alphabetical order. MUST BE STALKERS! ONLY EXPLANATION!

I would think that it's based on who views your profile/pictures/friends, etc... but nothing to do with you viewing their profiles. So I would think. And I don't think its anything to do with chatting or liking posts.

I tried this today for the first time. I think the list is who views my profile, in descending order. I have been on fb for 5 years, and I use chat approx one time/year. So this list is not related to "chat" interactions for me. I have 400+ friends.

My #1 & #2 are my daughters with whom interact often and both ways. Next #3 is a friend whom I rarely view, but she often comments and likes my stuff, so I know she views me. #4 is my brother whom I do view often. #5 is literally an old almost-married-him boyfriend with whom I have occassionally messaged in the past about reunion stuff, but nothing except messaging and I only view his wall 2ce/year. #6 & #7 are nice people who kinda bore me but for some reason I fascinate them, (sounds arrogant but that's the short explanation), so it totally makes sense they view me; I never view them. The next 10 or so include some people I view and interact with, but also an equal number of people I rarely eventhink about.

IMO, it's not about about being related to chat messages or not related. It's definitely related. The #1 on my list has moved up to that spot recently, while our chatting has increased and interactions have decreased. There is some formula that we don't know and likely won't ever know. My guess would either be by what percentage of our messages/likes/interactions go to certain people or giving different actions relative weights (e.g. 50 chat messages = a post on someone's wall) and then that list is ranked according to some raw score.

I maintain, as I said below, that the users are assigned values from -1 to 1 with our various interactions factoring into that. The jackpot question people seem to want to answer is whether it's a one-sided statistic or two-sided.

According to some research, it seems it only takes into account who would be viewing your profile. People I've tested this with say they would check someone's profile non-stop daily but would have them on that list all the way down to #10 or so.

I think a problem is also trying to create a reference for this. Like how often they view it or how much is needed to get to the top spot. How many times does the top person interact with our profile? Because realistically, it could be anything without a reference.

Also, did you get any more info on when it updates?

I've been keeping an eye on the sound thing and it has not changed. However, in hindsight I think I looked at the wrong section of code for what I thought I was looking for. In another section, there is this string:

"<li class="uiMenuItem uiMenuItemCheckbox uiSelectorOption" data-label="Chat Sounds"><a class="itemAnchor" role="menuitemcheckbox" tabindex="0" href="#" aria-checked="false">"

That corresponds to the setting Chat Sounds in the menu with the gear on the chat sidebar. Mine is turned off currently, but I will turn it on and refresh the page source to see if it changes.

I'm not so sure. I've been watching this since I found out about it a few days ago and it seems like it goes both ways.

I took a few people who were numbers 15 or 16 on my list (didn't automatically show up on chat list) and went out of my way to like a few of their photos. They all started showing up on chat even when they weren't online.

Just checked and it updated immediately to "true" when I turned Chat Sounds back on and immediately to "false" when I subsequently unchecked the setting. So that at least leaves open the possibility that the ID number list updates automatically.

You are correct that OrderedFriends has been replaced with IntialFriendsChatList. Oddly, my Ex-Girlfriend, who I have had just about ZERO contact with for 6 weeks is always #1. Plus, even when we were together we almost never used FB to communicate. My best friend is #3, and we NEVER communicate on FB. Either FB has implanted chips in our brains and hires people to stalk us or, more likely, this list really does show you who views your page the most...

Thanks for this guys. Just to add info, I never use chat

1 - My ex's cuzin (restricted my ex from viewing my profile). I sometimes like her stuff, she never likes or comments on mine.

2 - An old mate. He never ever comes on Facebook. I never visit his profile.

3 - A girl in my course who I have a crush on. Sometimes interact

4 - My close friend. Regular interactions.

5 - My ex. No interactions at all over last few months.

None of these ppl are in my 'close friends' list. On this i think it's based on each profile views both ways. & not upon frequency of views but relative to Facebook use.

Checked it just a few minutes ago and it seems like facebook had changed some settings.. A friend of mine whom I have NEVER interacted with appears SECOND on my list..

P.S. Just though I would add: I do view my Ex's page (perhaps more than I should ;p), however...I NEVER go to my BFs page. And then my mom is way up there on the list too...

Your comments make a lot of sense to me. I agree about the 'jackpot' unknown. I do not use chat, yet I have a 'InitialChatFriendsList' that seems plausible to be "who views me" moreso than "who I view". What do you think?

I don't know if the list shows who your bigger stalker is, but rather more like who you interact with frequently. Not sure how it's ordered but it makes sense and shouldn't come as much surprise, since it's basically your buddy list on chat.

Technically, it has to do with the chat sidebar and who's in your buddy list. It's within the bracketed section of code entitled, "ChatConfigInitialData." Also, the little piece of code next to that list is "require"[["ChatSidebar","init"

I signed out of chat and the list of people grayed out on my offline chat list were all the top users. Just food for thought.

Interesting list.

Looks pretty clear to me that it is sorted by "most interactions with" descending for some value of "interaction" and probably on some recent time window. (I know I send lots of messages to my podcast cohost and brother via facebook and they are my first two respectively.)

Facebook frequently recommends I add Adam (cohost) as a "Close Friend" (which is internal, not some app) whereas my brother already is, so that feature seems to be derived off this list.

Facebook uses an algorithm called Edgerank, to rank your friends by how much you interact with them, in order to give you better search results and filter your News Feed. The code appears to reveal one part of Facebook's EdgeRank. It seems like they order it based on who you interact with, whose profile you look at and who you have recently become friends with.

I dont think this is based on interactions. My top person is my boyfriend, and he rarely comments/likes on my profile, but he does check it everyday.


but do you chat a lot on the facebook with him?

going to reply to this thread bc i had the same result. boyfriend with whom i never interact on fb, and he's first on the list - i keep my chat disabled. my second is my best friend whose profile i never visit, incidentally - we do interact. the third was a man who i briefly flirted with but he was (and still is) taken- we also never interact. i'm inclined to believe that the numbers are in fact friends who check my profile, in order of frequency. the algorithm must also update this information every so often. FWIW, i wish this information weren't out there. we say we want it...

Are you in a relationship with him on FB? It seems almost unanimous that people who report their significant other have them at #1, regardless of the level of interaction with them. I'm guessing that relationships and family members listed on Facebook are always at the top. Which makes sense intuitively if the endgame is predicting who FB thinks you will want to chat with.

I don't chat with my top ten as much as I do with my 10-20, even from the beginning of facebook. So that can't be it..

Wrote a selenium thing to go through the list for me. My list wasn't particularly surprising - it's just the same people that show up on the news feed. I highly doubt it's influenced much by how much they visit your profile. It's just who facebook thinks your "best" friends are, based on a number of factors.

I guess these are stalkers. My #1 is my mom, which I rarely view her profile. My 3rd is my best friend, but I only visited hers thrice in my lifetime. The 5th, not to mention, i view his profile everyday.... So.... yes, these are stalkers....

it definitely has to be based on profile views or something else, more than interactions, because a few of my people i never interact with on facebook and almost never view their profile. but they all do have crushes on me.

When I do this, the ordered friends cannot be found in the source page. Could it be that Facebook took this out of their source page once people were doing it? If it makes any difference I am using a MAC

"InitialChatFriendsList" seems to have replaced "OrderedFriends", though the list of profiles has remained the same. I imagine Facebook wanted to put to rest all the speculation re: profile viewers, though I'm inclined to believe that's at least 80% of what it is. FYI, I keep my chat disabled. So how are they calculating who am I most likely to chat with in that case?

Question - do you think NON-friends who view my wall etc could appear on this list, or is it just friends?

I can't seem to do this on my mac? Can anyone help?

What's the number you're supposed to copy?

Check out my instructions: katantonio.com

figured it out; it must be done on either google chrome or firefox

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact