嘿伙计们我有一个简单的Facebook应用程序,可以将照片上传到用户时间线。 我已经批准了publish_actions。
当我尝试发布它返回的照片时
(#200)需要扩展权限:publish_actions
这是我的源代码
try {
// message must come from the user-end
$data = ['source' => $fb->fileToUpload($generaratedImage), 'message' => 'Support your school team add support banner to your profile picture using'];
$request = $fb->post('/me/photos', $data);
$response = $request->getGraphNode()->asArray();
} catch(Facebook\Exceptions\FacebookResponseException $e) {
// When Graph returns an error
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
// When validation fails or other local issues
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
但是当我使用Open graph测试用户进行测试时,它可以正常工作..
我在这里缺少什么?
我最近发现,当用户登录我的应用时会说
这不会让应用程序发布到Facebook。
如何解决此问题?
提前致谢。
答案 0 :(得分:2)
我已经批准了publish_actions。
批准意味着Facebook允许您向普通用户询问该权限; 当然不是意味着用户已经自动授予您对该应用的权限。
您仍然需要询问用户的权限,方法是通过登录流程发送。