Add pointer
opened this issue · comments
I have the following code in Objective C
PFUser *currentUser = [PFUser currentUser];
PFUser *friend //Set to another user
[currentUser addObject:friend forKey:@"followers"];
Once saved, this code adds a pointer in my user table to other users in my user table.
I am trying to figure out how to do this in the php library, but can't find a solution. Any ideas?
Note: I have tried adding the following array as a pointer, but it doesn't update/save the information
$array = array("__type" => "Pointer", "className" => "_User", "objectId" => $publisherId);
Her is what I ended up with
$parseObject = new parseObject('Followers');
$parseObject->shareUser = $parseObject->dataType('pointer', array('_User',$publisherID)); //Pointer to the User table