Search code examples
objective-ciosfacebook-ios-sdkrubymotion

Facebook-iOS-sdk error The operation couldn’t be completed. (facebookErrDomain error 10000.)


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.


Solution

  • 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)