Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:54:37+00:00 2026-06-16T16:54:37+00:00

I am trying to get a users friends checkins, I am using omniauth and

  • 0

I am trying to get a users friends checkins, I am using omniauth and koala gem.

When a user gets saved this method hits:

def add_friends
 friends_data = facebook.get_connections("me", "friends", :fields => "id, name, link, picture, gender, checkins")
     friends_data.map do |h|
        friend = Friend.new
        friend.uid = h["id"]
        friend.name = h["name"]
        friend.image = h["picture"]
        friend.gender = h["gender"]
        friend.urls = h["link"]
        friend.user_id = self.id
        friend.save!

        if (!h["checkins"].blank?)
           checkin = Checkin.new
           checkin.checkin_id = h["id"]
           checkin.user_id = h["checkins"]["data"]["from"]["id"] 
           checkin.user_name = h["checkins"]["data"]["from"]["name"] 
           checkin.tags = h["checkins"]["tags"]["data"]["name"]
           checkin.place_id = h["checkins"]["place"]["id"]
           checkin.place_name = h["checkins"]["place"]["name"]
           checkin.message = h["checkins"]["message"]
           checkin.created_time = h["checkins"]["created_time"]
           checkin.friend_id = friend.id
           checkin.save!
           end
         end
      end

But I get this error:

Koala::Facebook::APIError: HTTP 500: Response body: {"error_code":1,"error_msg":"An unknown error occurred"}

I dont really know what that means, any ideas? And does anybody know how to define a limit on checkins with the koala gem?
I tried something like this:

u.facebook.get_connections("me","friends", :fields => "checkins.limit(2)")

But I got the same error!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:54:38+00:00Added an answer on June 16, 2026 at 4:54 pm

    In fields, you’re requesting information about a friend, but ‘checkins’ isn’t a profile field, it’s an entirely different connection altogether.

    What you must do is loop through all the friend IDs and get the checkins for each:

    friend_checkins = []
    friend_ids = u.facebook.get_connections("me","friends", :fields => "id")
    friend_ids.each do |friend_id|
        friend_checkins << u.facebook.get_connections(friend_id,"checkins")
    end
    

    Also, when doing this, it would be a great time to look into batch requests with Koala, as you could potentially be making a lot of calls to the API here..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a list of user's friends using fb connect for the
I am trying to get the list of specific user`s friends from twitter. This
I'm trying get online friends by user in XMPP server (Ejabberd). I'm using Ruby
I am trying to get the friends of a test user using facebook graph
Ok I am trying to get the users First Name the form gets their
I am trying to get all group members from Domain Users. When using AD
I need to get basic user data from Facebook using FB.api('/<some_id>/') . This works
I am trying find all the users that are not in a friends user
I'm trying to get mutual friends between 2 people. I've saved the persons friends
I'm trying to get app users in javascript sdk. Why this is not working?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.