Facebook has reached an agreement with the company Timelines Inc. to settle a trademark infringement lawsuit over the social network's use of the name Timeline.