Facebook profile album aid

In search of best practice to get your facebook default profile (archive) album I came to the official facebook api wiki page. It states there that it is possible to calculate aid (album id) from your uid (user id) by simple formula:

(uid << 32) + (-3 & 0xFFFFFFFF)

Well, it may seem simple, but notice 32 bit left shifting in first part! By this operation on uid, you go far beyond integer max value and flash will not give you correct results. So how to do that?

Read the rest of this entry »