Garage doors use rolling codes and require a special procedure to program into home link, you can look up the directions for it.
Like:
Press and hold the two outside buttons on the Homelink® system until the LED starts to blink, release buttons. While the LED on the garage door opener is blinking, return to the vehicle and press the pre-programmed Homelink® button 4 times. (Or until the garage door operates).