Note that there are some explanatory texts on larger screens.

plurals
  1. POFQL query to fetch a user's Facebook friend's gender PLUS meeting_sex
    primarykey
    data
    text
    <p>Not quite as racy as it sounds - I'm using the below code to get a user's male or female friends only and it works fine. However, I also want to check their 'meeting_sex' which is a list of the genders a user's friend is interested in meeting, i.e. male, female or both. (Described <a href="https://developers.facebook.com/docs/reference/fql/user/" rel="nofollow">here</a>) </p> <p>The meeting_sex requires the friends_relationship_details permission which I've added to the graph API explorer, but my output looks like this:</p> <pre><code>"data": [ { "name": "ABCDEF", "pic_square": "https://abcdefg.jpg", "sex": "male", "meeting_sex": null, "uid": 123456789 }, </code></pre> <p>I.e. the meeting_sex is coming back null. I know the meeting_sex is an array, not just a string, as are the other elements, but why is it coming back null?</p> <p>I'm new to FQL, and in fact any QL, so once I do get the array to read properly, how do I then make the comparison? i.e so I only return MEN who like WOMEN or MEN who like MEN etc. Here's my current code: </p> <pre><code>NSString *queryString = [NSString stringWithFormat:@"SELECT name, pic_square, sex, meeting_sex, uid FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND sex = 'male' ORDER BY name"]; NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys: queryString, @"query", nil]; [FBRequest getRequestWithParams:dictionary httpMethod:@"GET" delegate:self requestURL:@"fql.query"]; </code></pre> <p>Thanks for any help :) </p> <p>Michael </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload