The class can renew expired tokens automatically next time you call the CallAPI function.
What you need to do is to use a specialized sub-class that stores tokens in a database, instead of the default storage which is session variables.
In this case that sub-class can retrieve tokens from the database and perform the calls even when the user is not present.
Take a look at this tutorial article. It was for Google but it works for Yahoo and others.
phpclasses.org/blog/package/7700/po
...