My son is 2.5-years-old, but has had to take allergy medication for quite some time. While most of the medicines have some sort of sweetness added to them, they're still not a pleasant experience. Although, he's had various other prescriptions (antibiotics) that aren't as pleasant as the allergy medicines.
My solution may not work for you, as my son has to take medication daily, and not just for a short-term prescription.
Use a medicinal syringe, and not a spoon. If one isn't provided, many pharmacies will provide them at no-cost. They can also provide toppers for the medicine bottle, so that you can use the syringe easily.
Bribe them with a treat. "If you take this medicine, you can have some candy." Candy is okay to give to children in moderation. It can help them maintain their blood sugar, and children's bodies are hard-wired to react positively to sources of sugar, and it may help their bones grow.
Tell them that if they take the medicine nicely, they can have extra candy. "If you take it without finding, you can have two pieces!"
Be determined to make the child take the medicine. You don't have to hold the child's nose to make them open their mouth. By using the medicinal syringe, you can push the tip of the syringe between their lips. I find that the corners of the mouth work best. Then, you can push the the liquid in, even if their mouth isn't open. It is not torture to give your child medicine that they need, even if you have to hold them down. Your child is simply not old enough to understand that the medicine is better for them in the long run. They only know that in the immediate now, it tastes unpleasant. One of the few ways young children have to communicate with adults is by crying, screaming, throwing tantrums, etc. It doesn't necessarily mean they're actually in pain or being traumatized, it just means that they're escalating through their available methods of communication.
Even if you made the child take the medicine, by forcing the syringe in, give them the candy you promised.
Eventually, the reward of candy will be associated with taking the medicine. For us, it did not take very long.
This seems very straight forward, but we also made additional choices to smooth the process along.
Give control to your child.
For my son, we gave him a variety of candies to choose from (I think we had left overs from some holidays. We don't normally by candy.) If we let him choose which candy he wanted before he took the medicine, he was more willing to take the medicine.
You can let the child pick out their "medicine candy" from the store. Have them pick a bag of something you're okay with, and emphasize that it's their candy for after they take their medicine.
We also gradually allowed him to take the medicine himself. He has always been very independent, and so it was easy for use to start allowing him to take the syringe and push the plunger in himself. He did make a mess a small number of times, usually by pushing it in too fast, but he learned to control that quickly, as well. You can prevent some messes by splitting up the dose, so your child doesn't have so much to "spill" at once.
The candy doesn't have to be big, or even candy! My son really likes jelly beans (we had the Starburst kind from Easter). We'd give him two of those tiny jelly beans and he'd be thrilled. Additionally, sometimes we'd give him his vitamins! He takes chewable gummy vitamins that are essentially candy for him.
Now, we almost never have to administer medicine to my son. We just had him the syringe and he's fine with it. We also don't give him candy every time, since he's so compliant. If he asks, we'll usually oblige, but he often forgets.
The occasions when we do have to force him to take the medicine are when he's really sick. He's feeling unwell, and is generally uncooperative (I don't blame him). But, when's he's on antibiotics it's important that he doesn't miss a dose, and that it's taken on time. For instance, failure to take antibiotics correctly as prescribed can have negative outcomes in the long term, and possibly result in recurring infections.
Not all young children are familiar with candy. It may be a poor incentive if your child doesn't know how good it makes them feel. So, before using it as an incentive you may have to give them a taste for it at a time when medicine isn't involved.