How do I place specific blocks on another specific block in 1.12?

Let’s look at the syntax for the /give command:

give <player> <item> [amount] [data] [dataTag]

You are missing the amount and data before your NBT.

Fixed command:

/give @p stone_button 1 0 {CanPlaceOn:["minecraft:planks"]}