Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

Failed to get response 201 when trying to create an object with GeoPoint #2

Closed
ldjpr opened this issue Feb 10, 2012 · 1 comment
Closed

Comments

@ldjpr
Copy link

ldjpr commented Feb 10, 2012

Hello
$parse = new parseRestClient(array('appid' => 'xxx, 'masterkey' => 'xxx'));

I am receiving the error in title. Here is the code.

$params = array(
'className' => 'class_name',
'object' => array(
'geo' => array('__type' => 'GeoPoint', 'latitude' => '43.35', 'longitude' => '11.0'),
'name' => 'my house'));

$request = $parse->create($params);

Can anyone help me with this? It works well if i remove the geo key.

thanks

ldj

@andrewscofield
Copy link
Owner

The problem here is the lat & long are being passed as strings, remove the single quotes there and should work for you.

Please check out my most recent changes for some fixes and updates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants