Ya se cual es el problema, es la API de face como hago 2 peticiones simultaneas de POST no funciona, estuve leyendo la documentacion de FACEBOOK y lo que sugiere es que lo haga en batch... q yo supongo es procesamiento por lotes y q lo meta todo en arrays para hacer una sola peticion de post, la cosa es que ahora no se como hacerlo... navegando por ahi me encontre con este codigo pero no lo entiendo muy bien :S
Agradezco la ayuda
Código PHP:
Ver original$facebook = new Facebook(...your stuff here...);
$access_token = ...get your access token however you want...;
//build the body of the post first... these are, for the most
// part, the parameters which would normally be passed as
// params to the api call
//any param normally passed as an array (such as properties
// and actions) MUST be json encoded
//remember to urlencode all urls
'id' => $page_or_user_id, //I am using this with page id's to maintain
//multiple pages at once
'message' => $message,
'link' => $link_url,
),
)
)
);
//now build the query to be appended to the api url
//I haven't come up with a better solution than this yet, but
// obviously it doesn't make sense to url encode all the
// characters only to decode them immediately after... Didn't
// want to have to write my own function yet :)
//now build the request
'method' => 'POST',
'relative_url' => 'feed',
'body' => $body
);
//append this to the batch array
$batch[] = $request;
//repeat this up to 19 times til you have all your requests in $batch then:
'access_token' => $access_token, // if this is different for each
// request add this to $request instead
);
$facebook->api('/', 'POST', $params);