| Please note: We are in the process of deprecating the REST API, and have added equivalent support to the Graph API for this method. Please use Graph API - User object and Get /User_id1/friends/User_id2 to check if User_id1 is friends with User_id2 . |
Returns whether or not two specified users are friends with each other. The first array specifies one half of each pair, the second array the other half; therefore, they must be of equal size.
| Name | Type | Description |
|---|---|---|
| uids1 | array | A list of user IDs matched with |
| uids2 | array | A list of user IDs matched with |
| callback | string | Name of a function to call. This is primarily to enable cross-domain JavaScript requests using the <script> tag, also known as JSONP, and works with both the XML and JSON formats. The function will be called with the response passed as the parameter. |
Returns a list of friend_info elements corresponding to the lists passed. The are_friends subelement of each friend_info element is 0 or false if the users are not friends, and 1 or true if they are friends. Note that, for each pair, this function is symmetric. That is, it does not matter which user is in uids1 and which is in uids2.
Privacy Note: Result pairs containing users not visible to the Facebook Platform or friend information not visible to the user on Facebook returns elements in the following manner:
XML:
<friend_info>
<uid1>1240077</uid1>
<uid2>1240078</uid2>
<are_friends xsi:nil="true"/>
</friend_info>
JSON:
{"uid1":"1240077","uid2":"1240078","are_friends":null}