Search code examples
ruby-on-railsfacebooker2

How do i pass parameters in Mogli


Using Mogli and facebooker gem, how do i get my wall data with a limit of 1000?

using this i get whole posts

def index

redirect_to new_oauth_path and return unless session[:at]
user = Mogli::User.find("me",Mogli::Client.new(session[:at]))
@user = user
@posts = user.posts

end

but i need to filter it with limit 1000


Solution

  • Seems that the only way is to set limit parameter in the client

    client = Mogli::Client.new(session[:at])
    client.default_params[:limit] = 1000
    user = Mogli::User.find("me", client)