如何隐藏页面发布使用Facebook api [英] how to hide page post using facebook api

查看:182
本文介绍了如何隐藏页面发布使用Facebook api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个代码,这是从这个链接 https://developers.facebook。 com / docs / reference / api / page / (请参阅隐藏页面帖子)

I have this code and It's from this link https://developers.facebook.com/docs/reference/api/page/ (Please see 'Hiding a Page Post')

我没有任何错误,但我的问题是,这段代码不行。页面帖子仍然没有隐藏

I don't have any error but my problem is, this code is not working. the page post is still not hidind

$fanpage_credit = array(
        'access_token' => $page_token,
        'is_hidden' => true
    );

$fanpage_post_url = '/'.$post_id;
$postResult = $facebook->api($fanpage_post_url, 'post', $fanpage_credit ); 



echo 'HIDE SUCCESS '.time(); 

我期待答案。谢谢!

推荐答案

您可以在发布后隐藏该帖子:

You can hide the post after you have posted it:

$fanpage_credit = array(
    'access_token' => $page_token,
    'is_hidden' => true
);

$fanpage_post_url = '/'.$post_id;
$postResult = $facebook->api($fanpage_post_url, 'post', $fanpage_credit ); 

if (isset($postResult["id"]))
    $facebook->api("/$postResult[id]", 'post', array("timeline_visibility"=>"hidden")); 

这篇关于如何隐藏页面发布使用Facebook api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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