When I arrived at Madrid Airport I bought a Spanish sim for my iPhone. It worked fine, was set up by the young guy right there at the counter. He spoke english, was very helpful. The shop was upstairs, an electronics shop, can't remember the name. All the apps I had loaded on my phone before leaving Australia worked perfectly - I never had a problem. You'll get a new number with the sim, notify your family of the new number. DON'T lose your old sim, you'll have to reinsert it when you get home in order to use your old phone number.
The only problem I had with the prepaid package was I couldn't attach photos or videos in text messages. I could receive them but not send. I assumed it was a limitation built into the package, could have been my mistake in not checking. Speaking english to Mundo customer service was not easy. I used iMessage and FaceTime many times for overseas calls. Always over a free wifi connection. Could have used Skype. WhatsApp should be fine. I can't help you with Facebook, I hate Facebook.
The phone company was Mundo, which is a Spanish subsidiary of Orange, it seems. My phone worked perfectly until I headed for Saint Jean a week later. As soon as I crossed the border into France, my phone lost signal, turned out I had to turn on roaming while outside Spain. I went to an Orange shop in Saint Jean and it was sorted in a couple of minutes. I ended up using the same sim after my Camino while in Paris for a month.
Topping up was pretty painless - just go to the international Orange top-up site, type in your phone number, and pay with a credit card.
The downside was, I received a lot of text messages in Spanish and was never sure what they were about - although they were obviously from Mundo. Was my data about to run out or were they trying to sell me something? I asked Ivar in Santiago to have a look at a few text messages and he said yes, they were tedious marketing messages. I didn't have to top up until about 2 months after I set up the phone with the new sim in Madrid. The phone worked perfectly all throughout my Camino. The only time I lost signal was in a valley a bit west of Pamplona.
On a previous trip to Europe, I bought a sim before leaving home. These are cumbersome to use, there's always a delay while making a call as you wait for an extra intermediate connection. On this trip, I used data for Google Maps a lot. I didn't want any hiccups with that vital app. I would never again buy a sim before leaving home.
You will have access to free wifi in many places along the Camino. This will save you eating into your prepaid sim plan, but you'll still need a sim to operate the phone. I travelled with an iPad for browsing and viewing photos, only used it with wifi.
I hope this helps. Any problems, just ask any 12-year-old.
Buen Camino, - Mike