I am trying to get the photos a user is tagged in. I am using the query:
SELECT pid
FROM photo
WHERE pid
IN (SELECT pid FROM photo_tag WHERE subject=me())
The number of results I get is 32. However when I run this query:
SELECT pid FROM photo_tag WHERE subject=me()
The number of results I get is 67. This is the number I expect because I am tagged in 67 pictures, not just 32. What am I doing wrong with the query?
It's possible that you're tagged in photos that are not accessible using the current access_token. Take one of the photo ids from the larger list that you don't see on the smaller list and try accessing it using that access_token.
photo_tag table contains photos in which your are tagged, photo table contains photo uploaded by you
In your situation, you are tagged in 67 photos, and 32 out of 67 photos are uploaded by you, the others are uploaded by someone else (and you're tagged).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With