I am going to Dublin on the same day! 😀
The last times that i visited there was a ticket machine outside the terminal building in front of the bus stops where you can get a ticket for travel for upto 90 minutes on any bus except the air link ones for just 2 or 3 euro, i usually buy two each (one for the return) as catching the bus back can be quite crowded in Dublin and it just makes it a bit easier knowing you dont have to pay the driver or get in the queues at the ticket centre. If you do choose to do this get the 16A bus from outside the terminal which takes you to O’Connell Street in the Centre of Dublin and takes around 50 minutes. If you want to get there quicker though get the 747 bus like MATaxi said ,which usually costs 6 euro and takes about 30 to 35 minutes.
Hope this helps.