When you post something on Facebook, you're usually doing it so people read and appreciate it. So, when people actually do that and "like" your posts, you're going to feel better about yourself. Time breaks down what's going on in your brain when that happens.
In research published in Frontiers in Human Neuroscience, researchers found that they could predict people's Facebook use by looking at how their brain reacted to positive social feedback in a scanner:
Specifically, a region called the nucleus accumbens, which processes rewarding feelings about food, sex, money and social acceptance became more active in response to praise for oneself compared to praise of others. And that activation was associated with more time on the social media site.
As it turns out, the social affirmation that comes when people like your status updates is addictive, which might help explain why people tend to spend so much time on Facebook:
On the social media site, the pleasure deriving from attention, kind words, likes, and LOLs from others occurs only sporadically. Such a pattern for rewards is far more addictive than receiving a prize every time, in part because the brain likes to predict rewards, and if it can't find a pattern, it will fuel a behaviour until it finds one. So if the rewards are random, the quest may continue compulsively.
The research is still fresh, but it makes sense that social media addiction is tied to the reward center of the brain.