ciao, questo è l'errore che mi da:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in sito.it/apps/fblogin/lib/Facebook/FacebookResponse.php on line 137
vorrei far notare che questo codice è stato scritto dai programmatori di Facebook!!
ciao, questo è l'errore che mi da:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in sito.it/apps/fblogin/lib/Facebook/FacebookResponse.php on line 137
vorrei far notare che questo codice è stato scritto dai programmatori di Facebook!!
ecco il codice, mi sapreste dire per favore dove sta l'errore? Grazie
se ci riesco perchè anche questo forum ha dei problemi
Codice PHP:public function getGraphObject($type = 'Facebook\GraphObject') {
return (new GraphObject($this->responseData))->cast($type);
}
Codice PHP:public function getGraphObjectList($type = 'Facebook\GraphObject') {
$out = array();
$data = $this->responseData->data;
for ($i = 0; $i < count($data); $i++) {
$out[] = (new GraphObject($data[$i]))->cast($type);
}
return $out;
}
che versione di php usi? mi pare che prima della 5.4 non si può fare
(new GraphObject($this->responseData))->cast($type);
Ma devi spezzare il codice
$graphObj = new GraphObject($this->responseData);
return $graphObj->cast($type); //Controlla cmq cosa fa cast()
ah ecco, infatti la versione di php è inferiore:
PHP Version 5.3.29
grazie boots, invece nella seconda parte di codice come lo devo spezzare?
Allo stesso modo!
Codice PHP:for ($i = 0; $i < count($data); $i++) {
$graphObj = new GraphObject($data[$i]);
$out[] = $graphObj->cast($type);
}
E lo so che il criterio era lo stesso ma non avevo capito il meccanismo di divisione quindi non sapevo riprodurre la procedura.
Grazie boots