Reputation: 127
I'm using Foursquare Push APIs in our server. It's working just fine but for one problem. I'm accessing user checkins in my php file as:
$jsonresponse = json_decode($_REQUEST["checkin"]);
and for the user I'm obtaining firstname, lastname etc as usual. But when I try to access user details (email etc.) by:
$jsonresponse->user->contact->email
it returns a blank field. I'm testing with my own 4Sq account so I know my email value is present. Am I missing something?
Thank you all in advance.
Upvotes: 0
Views: 630
Reputation: 4687
The Push API calls contain a compact user as opposed to a full user object (see: https://developer.foursquare.com/docs/responses/user). You'll need to retrieve the full user details to access the contact information (/users/self)
Upvotes: 2