Closed bretmatic closed 11 years ago
Hum, none of my friends had such unexpected format of checkins.
Can you see which friend has such issue? This debugging feature will help you. https://github.com/nov/fb_graph/wiki/Debugging
Also which version of fb_graph are you using?
couldnt reproduce the same error.. any pointers on the line number or trace of where the error is coming from?
I'm getting similar error when trying to fetch pages feed:
fb_page = FbGraph::Page.new(page.uid, access_token: access_token)
fb_posts = fb_page.feed(limit: 100) # <- errors here
here's the lib backtrace:
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/location.rb:9:in `[]'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/location.rb:9:in `initialize'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/venue.rb:6:in `initialize'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/page/category_attributes.rb:114:in `new'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/page/category_attributes.rb:114:in `initialize_with_category_specific_attributes'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/post.rb:113:in `new'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/post.rb:113:in `initialize'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/connections/feed.rb:7:in `new'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/connections/feed.rb:7:in `block in feed'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/connections/feed.rb:6:in `map!'
[GEM_ROOT]/gems/fb_graph-2.5.5/lib/fb_graph/connections/feed.rb:6:in `feed'
Seems like upgrading to 2.7.7 solves this problem at least for me.
@kittleb are you still getting this error?
Given that a user has created a user object: user = FbGraph::User.me(my_token)
There are some user checkins that will return the following type error: TypeError: can't convert Symbol into Integer
Easiest way to find this is to loop through friends. Someone in that list is almost guaranteed to have a "problematic" checkin:
user.friends.each do |friend| friend.fetch.checkins end
To clarify, it isn't ALL the checkins of a specific users. If you were to grab individual checkins via checkin[1] etc.. This doesn't always happen. It only happens to particular checkins, though so far I haven't been able to figure out what the difference is between the problem checkins and those that work fine.
Maybe similar to #310 ?