You should post the code that is actually giving you an error.
But it sounds like you're just trying to add it as a parameter in the glm function. The link is specified inside of the family. So you want family=poisson(link = "log")
But poisson defaults to log link so you don't really need to specify it in this case. You can view the defaults for each family by looking up the help page for family