Facebook Graph API覆盖显式设置隐私设置 [英] Facebook Graph API overriding explicitly set Privacy settings

查看:68
本文介绍了Facebook Graph API覆盖显式设置隐私设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代表用户设置由我的应用创建的帖子的隐私方面遇到问题。

I'm having problems setting the privacy for posts created by my App on behalf of the user.

问题是所有帖子都获得了隐私权尽管我将隐私权值明确设置为每个人,但由Graph API设置为ALL_FRIENDS。

The problem is that all the posts are getting their privacy value set as ALL_FRIENDS by the Graph API, even though I'm explicitly setting the privacy value to EVERYONE.

这是我用来提交的代码:

This is the code I'm using to submit:

$query = 'message='. urlencode($message) .'&privacy='. urlencode('{"value":"EVERYONE"}');
$url = 'https://graph.facebook.com/'. $obj_id .'/feed?access_token='. $user_fb_access_token;

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($curl, CURLOPT_REFERER, $referrer);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$data = curl_exec($curl);

curl_close($curl);

这样做。

完美的,直到八月的某个时候,我注意到了。

This code worked perfectly up until sometime in August when I noticed it.

其他任何人都有这个问题?

Anyone else having this issue?

推荐答案

这是与新的每个应用程式发布的隐私控制相关的,如果设置为好友,因此此应用程序只能设置与朋友一样宽的隐私。

This is related to the new per-app post privacy control, if is set to Friends so this App can only set privacy as wide as friends.

请阅读以下博客文章了解更多信息: https://developers.facebook.com/ blog / post / 543 /

Please read the following blog post for more info: https://developers.facebook.com/blog/post/543/

这篇关于Facebook Graph API覆盖显式设置隐私设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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