-3
我想做一个简单的职位到Facebook,我有同样的样本做一个邮政编码,我改变了一点。有没有办法做一个职位在PHP
我收到以下错误
解析错误:语法错误,意外 ';'在上线/home/consult/public_html/projects/facebook/index.php 13
线是
'access_token'=>;urlencode($code),
的代码:
<?php
//set POST variables
$url = 'https://graph.facebook.com/arjun/feed';
$code="testing";
$message="Test";
$fields = array(
'access_token'=>;urlencode($code),
'message'=>;urlencode($message),
);
//url-ify the data for the POST
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string,'&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
//execute post
// $result = curl_exec($ch);
//close connection
curl_close($ch);
?>
+1,为察觉这一点。 –
@DarinDimitrov:没有那么难,即使在那个混乱中 – genesis
@genesisφ为什么不帮助他通过**指出所有的错误**? – salathe