I gave this a try and ran into the same problem I belive but perhaps I can help explain it a little more.
It might be something worth posting in the Facebook wiki talkpage and see if someone from Facebook can shed some light on it unless I'm missing something here.
Anywhere I put USER_ID would need to be filled in with the user you want to search as and F_ID1, F_ID2 are friends ...
FQL #1: should work (in theory)
- First get a list of all your
friends
- then use that list in the IN clause
of the next query
- filter out to just posts made
by the USER_ID
- make sure the message isn't NULL
FQL #1: No posts are returned
{
"friends":"SELECT uid2 FROM friend WHERE uid1= USER_ID ",
"postsonfriendswall":"SELECT source_id, actor_id, target_id, message FROM stream WHERE source_id IN (SELECT uid2 FROM #friends) AND message != '' AND actor_id = USER_ID "
}
FQL #2: Posts are returned
Strangely however if you limit to just one friend (F_ID1), you will get back posts USER_ID made to their friends wall!
{
"friends":"SELECT uid2 FROM friend WHERE uid1= USER_ID ",
"postsonfriendswall":"SELECT source_id, actor_id, target_id, message FROM stream WHERE source_id IN (SELECT uid2 FROM #friends WHERE uid2 = F_ID1) AND message != '' AND actor_id = USER_ID "
}
FQL #3: No posts are returned
Yet, try to add another friend to the IN F_ID1 & F_ID2 ... no result again ...
{
"friends":"SELECT uid2 FROM friend WHERE uid1= USER_ID ",
"postsonfriendswall":"SELECT source_id, actor_id, target_id, message FROM stream WHERE source_id IN (F_ID1,F_ID2) AND message != '' AND actor_id = USER_ID "
}