Skip to content

Instantly share code, notes, and snippets.

@jpalala
Last active August 29, 2015 13:59
Show Gist options
  • Save jpalala/10574885 to your computer and use it in GitHub Desktop.
Save jpalala/10574885 to your computer and use it in GitHub Desktop.
EdenPHP - how to get FQL of group posts (group stream)
<?php
//...public function render() {
$fql = eden('facebook')->fql('YOUR-FB-TOKEN-HERE');
$this->_body['posts'] = $fql->search('message')
->setTable('stream')
->addFilter('source_id = 676736705716981') //mentorsdojo community group id
// ->debug(true) // (for debugging purpose)
->getRows();
// }
/*then in your view/template */
foreach($posts as $post) {
echo '<p class="community_post">' . htmlentities($post['message']) . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment