MediaPost Social Network

Up.friends.getAppUsers

Returns the identifiers of the current user's Facebook friends who are signed up for the specific calling application. The current user is determined from the session_key parameter. The values returned from this call are not storable.

Parameters

Type Name Required Description
string api_key The application key associated with the calling application.
string community Community system name. Use up.community.getList method to retrieve available communities.
string session_key The session key of the logged in user.
string sig An MD5 hash of the current request and your secret key, as described in the authentication guide.
string format Desired response format. Either XML (default) or JSON.

Example return XML

<?xml version="1.0" encoding="UTF-8"?>
<friends_getAppUsers_response list="true">
    <uid>222333</uid>
    <uid>1240079</uid>
</friends_getAppUsers_response>

Response

The friend ids returned are those friends signed up for the calling application, a subset of the friends returned from the friends.get method. If no friends are found, the method will return an empty friends_getAppUsers_response element.

UPQL equivalent

This function is similar (but returned in a slightly different format) to doing the following UPQL query, with the appropriate parameters filled in:

SELECT uid FROM user
 WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=loggedInUid)
      AND is_app_user

Error codes

Code Description
1 An unknown error occurred. Please resubmit the request.
2 The service is not available at this time.
4 The application has reached the maximum number of requests allowed. More requests are allowed once the time window has completed.
5 The request came from a remote address not allowed by this application.
101 The api key submitted is not associated with any known application.
102 The session key was improperly submitted or has reached its timeout. Direct the user to log in again to obtain another key.
104 Incorrect signature.