나는 Facebook에 사진을 업로드 할 간단한 iPhone 응용 프로그램을 가지고 있습니다. 이렇게하려면 여러 파일을 서버에 저장해야합니다. 그로부터, 그것은 페이스 북에 갈 것이다. 나는 아래 서버 코드를 수행 할 PHP 코드를 가지고있다.배열의 변수 (PHP)?
문제는 어레이에 변수를 넣을 때 문제가 있다는 것입니다. 나는 모든 다른 옵션을 시도하고 그것은 나를 위해 밖으로 작동하지 않습니다.
도움을 주시면 감사하겠습니다. 감사.
$args = array(
'message' => 'Photo from the ******** iPhone Application.',
'$short_url' => '$short_url'
);
$url = 'https://graph.facebook.com/'.$album_id.'/photos?access_token='.$get_facebook_token;
$ch = curl_init();
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));
좋아, 모든 견적은 여기에 잘 볼 필요가있다, 당신은 무엇을 기대했다? – JakeSteam
이것은 무엇입니까? ''$ short_url '=>'@ $ short_url '' | 그 곳에서''short_url '=> $ short_url'을 시도하십시오. 작은 따옴표'' ''는 삽입하지 않습니다. – Orbling
네 말이 맞아. @는 거기에서 쫓겨났다. – JakeSteam