【发布时间】:2014-02-06 15:30:35
【问题描述】:
这次我在我的应用程序 Public Ads 中实现了 Facebook Ignated 库。 Facebook 连接/登录没有问题。但是,当我每次获得结果时都想将客户广告发布到他们的 Facebook 时间线时:
仅适用于 FB 应用程序电子邮件
fb_feed() - Facebook::api() exception caught: (#200) The user hasn't authorized the application to perform this action
范围为 publish_actions
fb_feed() - Facebook::api() exception caught: An unknown error has occurred.
我在哪里犯错了?方法 fb_feed('post') 需要哪些范围权限?
这是我的代码:
$params = array(
"message" => "Message for customer's friends",
"link" => "http://www.mywebpage.com/ads/iphone4s/12312",
"picture" => "http://image.mywebpage.com/lHkOsiH.png",
"name" => "Sample title for ad",
"caption" => "www.mywebpage.com",
"description" => "Sample text of customer ad."
);
try {
$this->fb_me = $this->fb_ignited->fb_get_me();
} catch(FBIgnitedException $e) {
echo $e->getMessage();
}
if ($this->fb_me) {
try {
$feed_id = $this->fb_ignited->fb_feed('post',null, $params);
} catch(FBIgnitedException $e) {
echo $e->getMessage();
}
}
【问题讨论】:
标签: php facebook codeigniter facebook-graph-api