title: What is the best way to get list of photos with me and a friend tagged in them?
body: <p>I'm doing this fql:</p>
  
  <pre><code>SELECT object_id, pid, src_big, src_big_height, src_big_width, src, src_height, src_width 
  FROM photo 
  WHERE pid IN (SELECT pid FROM photo_tag WHERE subject= [me_uid]) AND pid IN (SELECT pid FROM photo_tag WHERE subject= [friend_uid] ) limit 0, 20
  </code></pre>
  
  <p>This works fine until I use 2 users ids who have thousands of photos with hundreds of them tagged with both uids. </p>
  
  <p>In this scenario, FB returns a <code>500 error:</code>
  <code>"Error loading script", error code 1</code></p>
  
  <p>I need to incrementally retrieve data as a user pages down. Getting All photos/tags for both users and then comparing the 2 full lists is not acceptable for this app.</p>
  
  <p>Any thoughts?</p>