If the funding fee is negative, the long pays the short. Conversely, if the fee is positive, the long pays the short. The funding fee is just exchanged between the two positions. If you want to earn the funding fee, you just have to go for the long.