用户必须在将照片发布到组页面时接受TOS - Facebook Graph API错误 [英] User must have accepted TOS - Facebook Graph API error when posting photos to group page

查看:111
本文介绍了用户必须在将照片发布到组页面时接受TOS - Facebook Graph API错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力从用户的计算机上传图像,并使用Facebook Graph API发布到我们的组页面。我可以发送一个帖子请求到Facebook与图像,但是我收到此错误:错误:(#200)用户必须已接受TOS。在某种程度上,我不认为我需要用户授权自己,因为照片被上传到我们的组页面。下面是我使用的代码:

I've been struggling to upload an image from the user's computer and posted to our group page using the Facebook Graph API. I was able to send a post request to facebook with the image however, I'm getting this error back: ERROR: (#200) User must have accepted TOS. To some extent, I don't believe that I need the user to authorize himself as the photo is being uploaded to our group page. This below, is the code i'm using:

    if($albumId != null) {
   $args = array(
    'message' => $description
   );
   $args[basename($photoPath)] = '@' . realpath($photoPath);
   $ch = curl_init();
   $url = 'https://graph.facebook.com/'.$albumId.'/photos?'.$token;
   curl_setopt($ch, CURLOPT_URL, $url);
   curl_setopt($ch, CURLOPT_HEADER, false);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($ch, CURLOPT_POST, true);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
   curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
   curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
   $data = curl_exec($ch);

   $photoId = json_decode($data, true);
   if(isset($photoId['error'])) die('ERROR: '.$photoId['error']['message']);
   $temp = explode('.', sprintf('%f', $photoId['id']));
   $photoId = $temp[0];
   return $photoId;
  }

有人可以告诉我,如果我需要从用户请求额外的权限或什么我做错了?

Can somebody tell me if I need to request extra permissions from the user or what i'm doing wrong?

非常感谢!

其实我从来没有成功:(作为一个工作,我们创建了一个新的Facebook用户,而不是一个

Actually, I never succeeded in this :(. As a work around, we created a new facebook user instead of a group page.

推荐答案

这是一个已知的错误,它看起来像是在处理它:

This is a known bug and it looks like they're working on it:

http://bugs.developers.facebook .net / show_bug.cgi?id = 11254

这篇关于用户必须在将照片发布到组页面时接受TOS - Facebook Graph API错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆