0

Ok, I have been trying to get my ios app working with the facebook-ios-sdk. Login goes pretty well until I try to make fb requests such as /me or /me/friends. I get a very unexplicable error:

The operation couldn’t be completed. (facebookErrDomain error 10000.)

I am currently implementing the 4 main callback methods:

  def request(request, didReceiveResponse:response)
    puts "Got it now: #{response.URL.absoluteString}"
  end

  def request(request, didLoad:result)
    puts "Another one: #{result.inspect}"
  end

  def request(request, didFailWithError:error)
    puts "Error: #{error.localizedDescription}"
  end

  def request(request, didLoadRawResponse:data)
    puts "Got raw: #{data}"
  end

And the second one never gets called. Any help would be very appreciated.

coneybeare
  • 33,113
  • 21
  • 131
  • 183
marcelorocks
  • 2,005
  • 3
  • 18
  • 28

2 Answers2

0

You got the error because the request you sent has some problem. Maybe you need to post your request related code for others to see what could go wrong.

The second method is only triggered when the request has been completed successfully, which is not the case of yours.

Khanh
  • 405
  • 3
  • 10
  • Ok, so I was able to get the real message: An active access token must be used to query information about the current user. Dont know what it means though, given that I am successfully logging in and saving the auth token on default params. – marcelorocks Jul 08 '12 at 02:49
  • Did you use the correct permissions? For getting user info, you must include "user_about_me", and for getting user's friends, you must include "read_friendlists". – Khanh Jul 08 '12 at 08:05
  • As I said in my answer below: Ok, so it turns out facebook sdk or any other idiotic piece of code wont give you the proper error message. I was sending params with a nil value when I needed to actually define the params I needed: self.app_delegate.facebook.requestWithGraphPath("me/friends", andParams:{:fields => "name, picture, location"}, andDelegate:self) – marcelorocks Jul 08 '12 at 16:59
0

Ok, so it turns out facebook sdk or any other idiotic piece of code wont give you the proper error message. I was sending params with a nil value when I needed to actually define the params I needed:

self.app_delegate.facebook.requestWithGraphPath("me/friends", andParams:{:fields => "name, picture, location"}, andDelegate:self)

marcelorocks
  • 2,005
  • 3
  • 18
  • 28