FQL:我喜欢,评论或我被标记的朋友的照片

I am looking for a query that returns the photos of my friends, but only the ones I have liked or commented and those I am tagged in. Does anybody khow how this query may look like? I have no idea where to start there...

I tried the following for the photos I am tagged in, but it does not work:

SELECT object_id, subject 
FROM photo_tag 
WHERE subject=me() and object_id IN(
  SELECT object_id 
  FROM photo 
  WHERE owner IN (
    SELECT uid1 FROM friend WHERE uid2=me()
  )
)

Thanks in advance!