Changeset 4862
- Timestamp:
- 08/11/07 05:23:04 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfFacebookPlatformPlugin/lib/helper/FBMLHelper.php
r4718 r4862 4 4 { 5 5 6 $options['href'] = _fb_url($internal_uri); 7 return content_tag('fb:action', $text, $options); 8 } 9 10 function fb_form_tag($action) 11 { 12 $url = _fb_url($action); 13 return form_tag($action); 14 } 15 16 function _fb_url($internal_uri) 17 { 6 18 if (!is_array($internal_uri) && preg_match('#^[a-z]+\://#', $internal_uri)) 7 19 { … … 18 30 $url = rtrim($host, '/') . $path; 19 31 } 20 $options['href'] = $url; 21 return content_tag('fb:action', $text, $options); 32 return $url; 22 33 } 34 35 function fb_link_to($text = '', $internal_uri ='', $options = array()) 36 { 37 $url = _fb_url($internal_uri); 38 return link_to($text, $url, $options); 39 } plugins/sfFacebookPlatformPlugin/lib/sfFacebookFilter.class.php
r4718 r4862 16 16 if ($this->isFirstCall()) 17 17 { 18 $user = $this->getContext()->getUser(); 18 19 19 require_once dirname(__FILE__).'/facebook-platform/client/facebook.php'; 20 21 $user = $this->getContext()->getUser(); 22 23 $appapikey = sfConfig::get('app_facebook_api_key'); 24 $appsecret = sfConfig::get('app_facebook_api_secret'); 25 26 if (!$appapikey) 27 { 28 throw new sfException("app_facebook_api_key not defined in app.yml"); 29 } 30 31 if (!$appsecret) 32 { 33 throw new sfException("app_facebook_api_secret not defined in app.yml"); 34 } 35 36 $this->facebook = new Facebook($appapikey, $appsecret); 20 $this->facebook = sfFacebook::getInstance(); 37 21 // our Facebook ID 38 22 $this->user = $this->facebook->require_login();