我试图建立一个Facebook应用程序,从特定的Facebook页面获取所有时间的评论,并将其填入Excel表格。
我正在使用PHP SDK V4.0,我发现如下:
$_request = new FacebookRequest($session, 'GET', '/*/comments');
但我需要的是从我曾经拥有的所有帖子中提取所有评论,类似于:
<div class="about-container">
<a id="about"name="about"></a>
<ul class="about-image">
<li>
<div class="image"></div>
<div class="overlay"><div class="bt1">Dan Morris</div><div class="bt2">Followers</div><div class="bt3">19.2K</div></div>
</li>
</ul>
<div class="about-header">HEY! I'M DAN, A FREELANCE <span style="color:#0171bd";>MULTIMEDIA JOURNALIST</span> BASED IN BRISTOL </div>
<div class="about-biography"><span class="text">Dan is a journalism graduate with an upper-class Batchelor of Arts (BA Hons) degree from the University of Chester. At 25 years old, Dan is an avid football fan and racing enthusiast. This is my online portfolio, where you will be able to find out more about me and explore my work.</span></div>
<div class="about-detail">
<div class="about-me">
<div class="about-me-image"></div>
<div class="about-me-header">
<h3>ABOUT ME</h3>
</div>
<div class="about-me-copy"><span class="text">Dan is a journalism graduate from the University of Chester. At 26, Dan is an avid football fan and racing enthusiast, bedroom DJ and radio fanatic.</span></div>
</div>
<div class="about-what-i-do">
<div class="about-what-i-do-image"></div>
<div class="about-what-i-do-header">
<h3>WHAT I DO</h3>
</div>
<div class="about-what-i-do-copy"><span class="text">Dan is no stranger to big stories and big interviews. He has covered a host of topics and interviewed some of the biggest names in showbiz .</span></div>
</div>
<div class="about-connect">
<div class="about-contact-image"></div>
<div class="about-contact-header">
<h3>CONTACT ME</h3>
</div>
<div class="about-contact-copy"><span class="text">Interested in working with Dan, then please do not hesitate to get in contact. Whether it's by phone, email or social media, he'll be sure to get back to you.</span></div>
</div>
</div>
<div style="clear:both;"></div>
</div>
希望有人有解决方案 感谢
答案 0 :(得分:1)
执行此操作的唯一方法是,使用/page-id/posts
阅读所有帖子并单独拨打/post-id/comments
,无法在一次通话中获取所有评论。
此外,请注意,您不会在每篇文章中获得所有这些内容,您可能需要实施paging。