Parse SDK gives: "Error: Pointer field owner needs pointer value" on Facebook

Ok, this error broke our live application and we have no idea what it is. After users log into Facebook, we get this error:Error: pointer field owner needs a pointer value

Any help is appreciated.

+3


source to share


3 answers


When I had this error, it was because I was passing in a string instead of an object of the type I had a pointer to. Try to pass the actual object.



+9


source


Without looking at any code, it sounds like you are trying to access the owner field by passing in a string instead of explicitly specifying and id.

Wrong:

[query whereKey:@"post"
        equalTo:@"1zEcyElZ80"];

      



Right:

[query whereKey:@"post"
        equalTo:[PFObject objectWithoutDataWithClassName:@"Post" objectId:@"1zEcyElZ80"]];

      

+7


source


The problem is you are parsing the STRING where, as it needs to be parsed as a pointer. Here's a PHP example:

$userId = "123456";

$query = ParseUser::query();
$query->equalTo("objectId", array("__type" => "Pointer", "className" => "_User", "objectId" => $userId));
$result = $query->find();

print_r($result);

      

It will spit out all user information. I'm sure you can handle the rest. If you have an iOS problem, its a similar problem will just change the syntax.

+1


source







All Articles