简体   繁体   English

使用PHP SDK获取Facebook Wall Post

[英]Get Facebook Wall Post using PHP SDK

HI any one can help me to fetch the post the facebook page and display it in my web page 嗨,任何人都可以帮助我在Facebook页面上获取帖子并将其显示在我的网页中

This is the url. 这是网址。 https://www.facebook.com/yakimonos https://www.facebook.com/yakimonos

I have worked with facebook login and sent invitations to friends. 我已经使用Facebook登录并发送了邀请给朋友。 So i have some basic knowledge in working with the facebook sdk. 所以我在使用Facebook SDK方面有一些基本知识。

But i don't know how to proceed with this task. 但是我不知道如何进行这项任务。

So please help me. 所以请帮帮我。

thanks to all. 谢谢大家。

You can use FQL to fetch posts of page. 您可以使用FQL来获取页面帖子。 You will require read_stream permission. 您将需要read_stream权限。

SELECT message FROM stream WHERE  source_id = 'page_id' and actor_id = 'page_id'

For your page- 对于您的页面

$fql = "SELECT message FROM stream WHERE  source_id = '183144838398839' and actor_id = '183144838398839'";
$posts = $facebook->api(array(
    'method' => 'fql.query',
    'query' => $fql,
));

print_r($posts );

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

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