Kod
<?php
$access_token = file_get_contents("my_token.txt");
$url = "https://graph.facebook.com/me/feed?method=POST";
$status = " test... ";
$ch = curl_init();
$attachment = array( 'access_token' => $access_token, 'message' => $status,);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
$result= curl_exec($ch);
curl_close ($ch);
if ($result)
{
echo " SUCCESS ";
}
?>
$access_token = file_get_contents("my_token.txt");
$url = "https://graph.facebook.com/me/feed?method=POST";
$status = " test... ";
$ch = curl_init();
$attachment = array( 'access_token' => $access_token, 'message' => $status,);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
$result= curl_exec($ch);
curl_close ($ch);
if ($result)
{
echo " SUCCESS ";
}
?>
i działa wszystko dobrze tylko problem taki że w pliku my_token.txt chciałbym aby wysyłalo do wiecej niz jednej osoby np dodam 15 rekordów to wysle do 15 bo teraz to tylko do 1 rekordu wysyla
pomoze ktos ?
f5