私がタグ付けされた特定の友人の写真と、この同じ友人がタグ付けされた私の写真を取得したい.友達リスト:
$facebook_login = "0";
$user = $facebook->getUser();
$perms = array('scope' => 'email,user_photos,read_mailbox');
if ($user) {
try {
$user_profile = $facebook->api('/me');
$facebook_login = "1";
} catch (FacebookApiException $e) {
$user = null;
}
} else {
die('<script>top.location.href="'.$facebook->getLoginUrl($perms).'";</script>');
}
//friend photos that I'm tagged in
$query = "SELECT id FROM photo WHERE from = $_POST[friend_id] AND tags IN ($user)";
$result = $facebook->api(array(
'method' => 'fql.query',
'query' => $query,
));
echo sprintf('<pre>%s</pre>', print_r($result,TRUE));
//my photos with my friend tagged in
$query = "SELECT id FROM photo WHERE from = $user AND tags IN ($_POST[friend_id])";
$result = $facebook->api(array(
'method' => 'fql.query',
'query' => $query,
));
echo sprintf('<pre>%s</pre>', print_r($result,TRUE));
これはできますか?
ありがとう