Skip to content

Instantly share code, notes, and snippets.

@antonrogov
Created October 14, 2009 10:45
Show Gist options
  • Save antonrogov/209973 to your computer and use it in GitHub Desktop.
Save antonrogov/209973 to your computer and use it in GitHub Desktop.
admin = Facebooker::Session.new.admin
properties = admin.get_app_properties :preload_fql
preload_fql = JSON.parse(properties.preload_fql) || {}
if preload_fql['online_friends'].blank?
if preload_fql['friends'].blank?
preload_fql['friends'] = {
:pattern => '.*',
:query => "SELECT uid2 FROM friend WHERE uid1 = {*user*}"
}
end
preload_fql['online_friends'] = {
:pattern => '.*',
:query => online_friends_fql
}
admin.set_app_properties :preload_fql => preload_fql.to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment