Taging картинки из Facebook API: я думаю, что некоторые Array 'Key' или Json Encode является причиной

Я пытаюсь опубликовать картинку на Facebook с помощью API Graph. Как бы то ни было, я не могу это опубликовать. Я получаю эту ошибку

Array ([error] => Array ([сообщение] => (# 100) Неверный параметр [тип] => OAuthException [code] => 100))

Вот мой код

$sqls= mysql_query($sql);
    while($sqlr = mysql_fetch_array( $sqls, MYSQL_NUM ))
 {
     $users[]= $sqlr['regidfriendsid'];
 }

 for ($t=0 ; $t ($users[$t]), 'x' => (20+$x), 'y' => (85+$y) );

$x=$x+200;
$z++;
        if ($z%4==0)
        {
        $y=$y+178;
        $x=0;

        }
 }

$tag = array($tag[1], $tag[2], $tag[3]);    

$tags = json_encode($tag);
print_r($tags);
// end loop for tags


//upload photo
$file= 'styleimage/save_as_this_name.jpg';
$args = array(
   'message' => 'My Stylish friends',
    'tags' => $tags, 
);
print_r($args);
$args[basename($file)] = '@' . realpath($file);
$ch = curl_init();
$url = 'https://graph.facebook.com/me/photos?access_token='.$_SESSION['access_token'];
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
$data = curl_exec($ch);
//returns the photo id
print_r(json_decode($data,true));

ВЫХОД

        [{"tag_uid":"100003656759153","x":220,"y":85},{"tag_uid":"100004078326378","x":420,"y":85},{"tag_uid":"100000034798548","x":620,"y":85}]@@@@@Array ( [message] => My Stylish friends [tags] => [{"tag_uid":"100003656759153","x":220,"y":85},{"tag_uid":"100004078326378","x":420,"y":85},{"tag_uid":"100000034798548","x":620,"y":85}] ) 

--Before posting the actual content of tags . Now trying to post ---

    Array ( [error] => Array ( [message] => (#100) Invalid parameter [type] => OAuthException [code] => 100 ) )

Ответы на вопрос(1)

Ваш ответ на вопрос