In this example, affinity is an edge property (stored on the "friend" edge), weight is an edge property (stored on the "news" edge), and decay is a calculated value based on a timestamp stored as a property on the news edge -- I fudged on decay because I don't know what their decay formula is.
From what I could glean from the article, weight is static for each content type, and affinity is a calculated value. Facebook may update the affinity value after each user action or run some kind of PageRank-type algorithm for friends and update it periodically.
But in Gremlin, you can calculate PageRank in 2 lines.