Rails Koala gem and friends count
Asked Answered
R

1

10

Can somebody help me with getting total_count of user friends?

u.facebook.get_connection("me", "friends",api_version:"v2.0")

This return 0 because it return friends that also use my app.

But in api 2.0 facebook give total_count field with friends number

{
  "data": [
  ], 
  "summary": {
    "total_count": 455
  }
}

How can I get this by koala gem?

u.facebook.get_connection("me", "friends/#{summary}",api_version:"v2.0")

This return error.

ANSWER if someone will search for this:

facebook.get_connection("me", "friends",api_version:"v2.0").raw_response["summary"]["total_count"]
Reahard answered 31/10, 2014 at 17:22 Comment(0)
A
1

For ease of others, you can accept this:

facebook.get_connection("me", "friends",api_version:"v2.0").raw_response["summary"]["total_count"]
Afroamerican answered 30/4, 2015 at 14:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.