David Clements
2008-Jan-14 22:03 UTC
[Facebooker-talk] Setting profile FBML for a Facebook Page
Had a user add our app to a Facebook Page, http://www.facebook.com/business/?pages. Facebook Pages act like users but are more for businesses and Bands. It looks like the current Facebooker API doesn''t currently support setting the Profile FBML for a Page. The current code for setting the proflie is this: def profile_fbml=(markup) session.post(''facebook.profile.setFBML'', :uid => @id, :markup => markup) end The UID is actually hard coded to be the authenticated User. This is more restrictive than the Facebook API allows. You can actually pass in any User ID. And Facebook pages act like users so get around this I changed it around a little. def profile_fbml=(markup) update_profile_fbml_for_user(markup, @id) end def update_profile_fbml_for_user(markup, user_id) session.post(''facebook.profile.setFBML'', :uid => user_id, :markup => markup) end Hope this helps some people out, I didn''t really even understand Facebook Pages until I got the support request. Let me know if I am missing something here, and if not I will upload a patch. Dave