【发布时间】:2013-12-04 22:22:21
【问题描述】:
我尝试在我的墙上发布新闻(面向所有人),但我的程序无法运行,您能帮帮我吗?
$app_config = array(
'appId' => 'xxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxx',
'cookie' => true
);
$page_config = array(
'access_token' => 'xxxxxxxxxxxxxxxxxxxxxxxxx',
'page_id' => 'xxxxxxxxxxxxxxxxxxxxx'
);
$facebook = new Facebook($app_config);
$privacy=array('value' => 'EVERYONE');
$decri=array('name' => 'See the link', 'link' => 'http://www.xxxxxx.com');
$description="this is a test";
$picture="a.png";
$params = array(
'access_token' => $page_config['access_token'],
'name' => $title,
'caption' => 'www.xxxxxx.com',
'link' => 'http://www.xxxxxx.com',
'description' => $description,
'picture' => $picture,
'status_type' => 'mobile_status_update',
'type' => 'status',
'privacy' => json_encode($privacy),
'actions' => json_encode($decri)
);
$post_id = $facebook->api('/'.$page_config['page_id'].'/feed','post',$params);
但是什么都没有发布,我不明白 非常感谢你
【问题讨论】:
标签: facebook-graph-api facebook-php-sdk facebook-page