- At https://developers.facebook.com create a new APP, after creating you get the required ID and SECRET.
- From https://github.com/facebook/facebook-php-sdk download the PHP SDK
require_once(WB_PATH."/include/facebook/src/facebook.php"); // Get from https://github.com/facebook/facebook-php-sdk $APP_ID = 'APPID'; $APP_SECRET = 'APPSECRET'; $GROUP_ID = 'GROUPID'; $config = array( 'appId' => $APP_ID, 'secret' => $APP_SECRET, 'fileUpload' => false, 'allowSignedRequest' => false, ); $facebook = new Facebook($config); extract($facebook->api("/$GROUP_ID/feed?limit=10")); $posts = ''; foreach ($data as $d) { if (!empty($d['message'])) { $posts .= '
'.$d['message'].'
During googling I found http://pastebin.com/LPnzUQSF, but I didn't try.
No comments:
Post a Comment