I’m working on a Facebook application and I need to select all my friends that are not fan of a specific page: any idea on how can I build the query?
UPDATE
I apologise, I’ll try to be much more clear.
In my application I want to select all the friend that are not fan of a page, because I want to invite them to I Like the page.
Looking into the developer guide I read that is not possible to execute the SQL NOT IN, so using the FQL how is it possible to retrieve those friends who Not Like the page?
run this FQL query:
SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND uid IN (SELECT uid FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND page_id='YOUR_PAGE_ID')=''Edit:
You must has
user_likesandfriends_likespermissions in order to get this data