简体   繁体   English

Android Facebook SDK-与公众分享帖子

[英]Android Facebook SDK - Share post with public

I'm using Facebook SDk for android for posting statuses to user's timeline and it works fine except that the posts are shared with the user's friends and not with the public which is what I need it to do. 我正在使用Android的Facebook SDk将状态发布到用户的时间轴上,并且工作正常,除了帖子是与用户的朋友共享而不是与公众共享,这是我需要做的。 I didn't find any solution yet so I'm asking this forum. 我尚未找到任何解决方案,所以我问这个论坛。

Hope my question is clear. 希望我的问题清楚。

Thanks a lot! 非常感谢!

To change the privacy setting of a feed, you can add additional parameter- privacy with your /me/feed call. 要更改Feed的隐私设置,您可以在/me/feed调用中添加其他参数privacy

JSONObject privacy = new JSONObject();
privacy.put("value", "EVERYONE");
params.putString("privacy", privacy.toString());
..... //other params
..... // make the call `/me/feed`

More details here 在这里更多细节

Please Note 请注意

A user can also manually sets the privacy of an application. 用户还可以手动设置应用程序的隐私。 To check this: go to your Facebook Settings , see what you've set your application to. 要进行检查,请执行以下操作:转到“ Facebook设置” ,查看将应用程序设置为的内容。

The actual privacy applied will be the more restrictive privacy setting between the two. 应用的实际隐私将是两者之间的限制性更严格的设置

eg. 例如。

If the user has set " Only Me " in the facebook settings, but in app you applied " Public ", then the user's preference, ie Only Me will be used. 如果用户在Facebook设置中设置了“ Only Me ”,但是在应用程序中您应用了“ Public ”,则将使用用户的首选项,即Only Me
But if the user has set " Public " in the app settings, but in the app you applied " Friends ", then the app's setting ie " Friends " is used, as it's more restrictive than the User's settings. 但是,如果用户在应用程序设置中设置了“ 公共 ”,但是在您应用了“ 好友 ”的应用程序中,则将使用该应用程序的设置,即“ 好友 ”,因为它比用户设置的限制要严格。

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM