API Reference

Geo.getUsersFromArea

This function returns users for a square area defined by the $northEast and $southWest tips of the square.

Syntax

mixed geo.getUsersFromArea ( int vhost, array northEast, array southWest )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost of the application.
northEastarrayRequirednoneThe north-east (upper-right) point of the square that defines the area for the users. Along with $southWest, is provides the co-ordinates for the area that is to show the users. Example: $northEast[0] => 62.865220228976895, $northEast[1] => -52.44921875
southWestarrayRequirednoneThe south-west (lower-left) point of the square that defines the area for the users. Along with $northEast, is provides the co-ordinates for the area that is to show the users. Example: $southWest[0] => 35.08404808848904, $southWest[1] => -131.55078125

Response

Below are the fields available in the returned array.

NameTypeDescription
idINTThe user id.
userSTRINGThe user name.
firstnameSTRINGThe first name for the user.
lastnameSTRINGThe last name for the user.
citySTRINGThe city in which the user lives.
genderCHARThe gender of the user. M for male and F for female.
countrySTRINGThe country in which the user lives.
avatarINTThe media item that the user has set as their avatar.
nicknameSTRINGThe user's nickname.
geo_latitudeFLOATThe geographical latitude of the user's mobile device. i.e.: 40.775729609144044
geo_longitudeFLOATThe geographical longitude of the user's mobile device. i.e.: -84.44921875
gravataridINTThe id of the user's gravatar.
external_idARRAYAn array with the user's external login information. The array holds 2 key/value pairs witht the keys being: 'external_id_provider' and 'external_id'.
An example is:

[external_id] => Array(
   [0] => Array(
    [external_id_provider] => facebook
    [external_id] => 881845421
   )  
)

Sample Response

Code examples

0 comments

Be the first to comment on getUsersFromArea.

Add a Comment

  • captcha