Created
October 14, 2009 10:45
-
-
Save antonrogov/209973 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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