I'm at a friendly gym and would like to add a pokemon, but the add pokemon button is not showing. There is only one pokemon here. Where is the add pokemon button? I'm at a high enough level but I have not been able to add a pokemon to any gym.
The most likely cause of this is that all of the gym's slots are full, which means you will not be able to add another Pokémon until the gym is upgraded. Gyms can hold a number of Pokémon equal to the gym's level, so the gym in question is likely only level one, and its slot is already full. To increase a gym's level, you must win friendly "battles" (training) against the gym using only one Pokémon (as opposed to the usual six). Every time you beat a Pokémon at that gym, its prestige will raise, eventually leveling it up and adding another slot. At this point, you should be able to add a new Pokémon to the gym.
As Riley mentioned, the button will appear in the bottom left corner of the gym when there is an empty slot, and any Pokémon that you wish to place in that gym must be full health.
If the Gym is level 1 then you have to beat the current Pokémon and then the Gym will level up to level 2 and hence it will be able to hold 2 Pokémon instead of 1, so then you can add your own. Sucks when the 1st allied Pokémon is super strong, amirite? Basically, the Gym can hold the same amount of Pokémon as its level. 1 can hold 1, 2 can hold 2, and so on. Have fun trying to beat that 1700 CP Friendly Vaporeon just so you can make the Gym stronger