Is Facebook friend rotation based on who viewed you last or who you last viewed?

Well they said that it was based on the last viewed. But others said that it is random or the people you interact the most. What I think is it is based on the last view, because the people appearing in my profile is the least whom I interact with..