-1

我正在尝试将图像从远程服务器直接上传到 fb 服务器,但第 7 行出现错误语法错误告诉我它有什么问题

<?php
require_once("facebook.php");
$config = array();
$config[‘appId’] = 'xxxxxxxxxxxxx';
$config[‘secret’] = 'xxxxxxxxxxxxxxxxxxx';
$config[‘fileUpload’] = true/ optional
$facebook = new Facebook($config);
$attachment = array('message' => 'Want an Amazing Cover for your profile then checkout the link below. ',
'name' =>'xxxxx',
'caption' => "xxxxxxx",
'link' => 'http://apps.facebook.com/xxxxxxxxx/',
'description' => 'xxxxxxxxxxxxxx', //blah blah
'picture' => 'http://xxxxxxxxxxxxxx.com/wp-content/uploads/2012/02/under-construction-fb-cover1.jpg'.$Picturetoupload,
'method'=>'stream.publish',
'actions' => array(array('name' => 'xxxxxxxxxxxxx',
'link' => 'http://apps.facebook.com/axxxxxx/')));
$uid=$fbme['id'];  // id of the user 
$result = $facebook->api('/'.$uid.'/feed/','post',$attachment);
?>
4

1 回答 1

4

您在第 6 行缺少分号,并且使用了不正确的注释和引号。

$config[‘fileUpload’] = true/ optional

应该:

$config['fileUpload'] = true; // optional;
于 2012-06-06T13:58:18.780 回答