Ejemplo n.º 1
0
 /**
  * Returns Facebook subscribe
  *
  * @param string
  * @param string
  * @return Eden_Facebook_Subscribe
  */
 public function subscribe($clientId, $secret)
 {
     return Eden_Facebook_Subscribe::i($clientId, $secret);
 }
Ejemplo n.º 2
0
if(!class_exists('Eden_Facebook')){class Eden_Facebook extends Eden_Class{const RSS='https://www.facebook.com/feeds/page.php?id=%s&format=rss20';const RSS_AGENT='Mozilla/5.0 (X11;U;Linux x86_64;en-US;rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13';public static function i(){return self::_getSingleton(__CLASS__);}public function auth($key,$secret,$redirect){Eden_Facebook_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string');return Eden_Facebook_Auth::i($key,$secret,$redirect);}public function event($token,$name,$start,$end){return Eden_Facebook_Event::i($token,$name,$start,$end);}public function fql($token){Eden_Facebook_Error::i()->argument(1,'string');return Eden_Facebook_Fql::i($token);}public function graph($token){Eden_Facebook_Error::i()->argument(1,'string');return Eden_Facebook_Graph::i($token);}public function link($token,$url){return Eden_Facebook_Link::i($token,$url);}public function post($token,$message){return Eden_Facebook_Post::i($token,$message);}public function rss($id){Eden_Facebook_Error::i()->argument(1,'int');return Eden_Curl::i()->setUrl(sprintf(self::RSS,$id))->setUserAgent(self::RSS_AGENT)->setConnectTimeout(10)->setFollowLocation(true)->setTimeout(60)->verifyPeer(false)->getSimpleXmlResponse();}public function subscribe($clientId,$secret){return Eden_Facebook_Subscribe::i($clientId,$secret);}}}