Pagination is broken #65

Closed
sent-hil opened this Issue May 3, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@sent-hil

sent-hil commented May 3, 2011

>>results = FbGraph::Page.search("FbGraph")
...
>> results.next
=> []
>> results.previous
=> []
>> results.collection.next
=> {}
>> results.collection.previous
=> {}

Running fb_graph 1.7.2 and Ruby 1.9.2

@tmlee

This comment has been minimized.

Show comment
Hide comment
@tmlee

tmlee May 4, 2011

Contributor

Try it with a different example like
results = FbGraph::Page.search("platform")

I am thinking it could be because the search query made on FbGraph is only returning 1 entry result. So there is no next or previous entry to go to which is not returning anything

Contributor

tmlee commented May 4, 2011

Try it with a different example like
results = FbGraph::Page.search("platform")

I am thinking it could be because the search query made on FbGraph is only returning 1 entry result. So there is no next or previous entry to go to which is not returning anything

@nov

This comment has been minimized.

Show comment
Hide comment
@nov

nov May 6, 2011

Owner

Rights.
You can confirm it to access this URL directly.
https://graph.facebook.com/search?type=page&q=fbgraph

Owner

nov commented May 6, 2011

Rights.
You can confirm it to access this URL directly.
https://graph.facebook.com/search?type=page&q=fbgraph

@nov nov closed this May 6, 2011

@sent-hil sent-hil reopened this May 6, 2011

@sent-hil

This comment has been minimized.

Show comment
Hide comment
@sent-hil

sent-hil May 6, 2011

You're right, however:

>> p = FbGraph::Post.fetch("19614945368_10150164912642023")
=> ...
>> p.comments.count
=> 49
>> p.comments.collection.total_count
=> 1003
>> p.comments.collection.next
=> {}
>> p.comments.next
=> []

Perhaps I'm doing this wrong, but shouldn't the last two return comments rather than blanks?

Btw, thank you for your prompt replies, I appreciate it.

sent-hil commented May 6, 2011

You're right, however:

>> p = FbGraph::Post.fetch("19614945368_10150164912642023")
=> ...
>> p.comments.count
=> 49
>> p.comments.collection.total_count
=> 1003
>> p.comments.collection.next
=> {}
>> p.comments.next
=> []

Perhaps I'm doing this wrong, but shouldn't the last two return comments rather than blanks?

Btw, thank you for your prompt replies, I appreciate it.

@nov

This comment has been minimized.

Show comment
Hide comment
@nov

nov May 7, 2011

Owner

Ah, comments and likes are cached in some context.
Call p.comments.next(:no_cache => true) in such case.

Owner

nov commented May 7, 2011

Ah, comments and likes are cached in some context.
Call p.comments.next(:no_cache => true) in such case.

@nov nov closed this May 7, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment