I learned this the hard way not too long ago when someone informed me that a number of people I'd worked with who I'd thought of as friends just really disliked me. It hit hard at first because I thought of them as friends- 'work friends' at the very least, and made me start questioning other people that I thought of as friends.
After letting my mind spin in a tight loop about it for a while I decided that really it doesn't matter that much, because I'm happier liking people, and I can like someone and be friendly even irrespective of if they like me or not. Of course I'm not going to push my company on people who are clear that they don't want it, but it doesn't really do any good to second guess who actually cares for me and who is being polite.
After letting my mind spin in a tight loop about it for a while I decided that really it doesn't matter that much, because I'm happier liking people, and I can like someone and be friendly even irrespective of if they like me or not. Of course I'm not going to push my company on people who are clear that they don't want it, but it doesn't really do any good to second guess who actually cares for me and who is being polite.