X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ffacebookutil.php;h=beab51366081b90b77a9775bf0f3cef04a225bd3;hb=2d063650effb22c90936a4588f44946c69e1d9a1;hp=e844dd09a58ea5541de67466e067416f55c0a2a9;hpb=689be142158dae5af1516cb38b947f0364d725dd;p=quix0rs-gnu-social.git diff --git a/lib/facebookutil.php b/lib/facebookutil.php index e844dd09a5..beab513660 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -17,13 +17,16 @@ * along with this program. If not, see . */ -require_once(INSTALLDIR.'/extlib/facebook/facebook.php'); -require_once(INSTALLDIR.'/lib/noticelist.php'); +require_once INSTALLDIR.'/extlib/facebook/facebook.php'; +require_once INSTALLDIR.'/lib/facebookaction.php'; +require_once INSTALLDIR.'/lib/noticelist.php'; define("FACEBOOK_SERVICE", 2); // Facebook is foreign_service ID 2 +define("FACEBOOK_NOTICE_PREFIX", 1); +define("FACEBOOK_PROMPTED_UPDATE_PREF", 2); // Gets all the notices from users with a Facebook link since a given ID -function get_facebook_notices($since) +function getFacebookNotices($since) { $qry = 'SELECT notice.* ' . 'FROM notice ' . @@ -32,20 +35,20 @@ function get_facebook_notices($since) 'AND foreign_link.service = 2'; // XXX: What should the limit be? - return Notice::getStreamDirect($qry, 0, 100, 0, 0, null, $since); + //static function getStreamDirect($qry, $offset, $limit, $since_id, $before_id, $order, $since) { + + return Notice::getStreamDirect($qry, 0, 1000, 0, 0, null, $since); } -function get_facebook() +function getFacebook() { $apikey = common_config('facebook', 'apikey'); $secret = common_config('facebook', 'secret'); return new Facebook($apikey, $secret); } -function start_fbml($indent = true) -{ - global $xw; - $xw = new XMLWriter(); - $xw->openURI('php://output'); - $xw->setIndent($indent); -} \ No newline at end of file +function updateProfileBox($facebook, $flink, $notice) { + $fbaction = new FacebookAction($output='php://output', $indent=true, $facebook, $flink); + $fbaction->updateProfileBox($notice); +} +