If they did, then where did they get freshwater from?
I don't think it requires a lot of trial and error to learn that it's not a good idea to drink seawater. Oceania's geography can be broadly divided into two island types: high, volcanic islands and low coral atolls. High volcanic islands are sustained by rainfall, which turns into rivers and streams and flows out into the lagoon (if there is one) or directly to the ocean. As long as that water isn't contaminated by human or animal waste, it's generally safe to drink. Low coral atolls that are larger than roughly two square miles usually have a "lens" of freshwater below the soil at the center of the land. That freshwater can be used for drinking or growing crops like taro.
Of course, water isn't the only option available. Coconut water is high in electrolytes and delicious, and coconuts keep well for sea voyages. Many islanders also have a tradition of drinking kava ceremonially, and various islands also produce different plants that can be used for tea.