how to add facebook like features in zend based application ? is the code will be placed in view or in helpers ?
facebook.app_id = "APPID"
facebook.app_secret = "SECRET"
thanks
the easiest way to add facebook like in zend is by adding the code in helpers, later can be called from the view.
class Application_View_Helper_GetFacebookLikeBox extends Zend_View_Helper_Abstract
{
public function getFacebookLikeBox()
{
$config = Zend_Registry::get('config');
$app_id = $config['facebook']['app_id'];
return '<iframe
src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FEXAMPLE&
width=250&height=284&colorscheme=light&show_faces=true&border_color&
stream=false&header=false&appId='.$app_id.'"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:284px;"
allowTransparency="true">
</iframe>';
}
}
then from view just call $this->getFacebookLike(); will render the facebook like button.