I'm debugging my storefront right now so that it works properly with my client's entitlement server. What I'm trying to do is to show all the entitled folio when a user is logged in and hide them when the user are logged out. Currently i'm using setInterval to check if the user is logged in every few secs and refresh the page. But after I refresh the page, I found out that sometimes i caught an exception "ReferenceError: Can't find variable: adobe" in my iPad, and I might not get the correct information from getFolioData. I also noticed that according to the API - "if no current or cached information is available, the function will return an empty list". So my questions are:-
Thanks in advance =]
I asked someone who has more experience with custom entitlement than I do. He says the viewer caches the folio list, so it doesn't have to fetch and parse it every time someone looks at the library. You should not worry about the returned data being stale. It will return the data that the viewer is currently using. However, you should register for an updateLibrary() event. This will get called whenever the state of the user changes.
Europe, Middle East and Africa