Ripley, Fan pages are the same as Profiles.
Just the profile type is set to page instead of user.
So a page will carry a profile id just like a group or user.
You can change the code to post to your fanpage instead of yours.
I'm probably talking wrong here. but you may be able to find a way to change it.