FacebookCredentials::$app_id, 'secret' => FacebookCredentials::$app_secret, 'cookie' => true)); $req = array( 'access_token' => FacebookCredentials::$access_token, 'message' => $post_text); $res = $facebook->api('/me/feed', 'POST', $req); } class fb extends Hook { public function doHook(Post $post) { post_facebook_link_to_post($post->array_for_template()); } } ?>