Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

YAFookPageBox — Yet Another FacebOOK Page Plugin

Simple WordPress plugin, which provides sidebar widget with Facebook Page Plugin box. It's based on a standalone PHP class used to generate widget source code, which is reusable in different projects.

  • Any external scripts or stylesheets aren't included to the webpage. Instead, simple <iframe> is used.
  • Width of <iframe> is automatically calculated to fit horizontal free space.
  • Small inline script is generated to reload <iframe>'s content when the window is resized. Without it, widget isn't responsive.
  • It's possible to delay <iframe>'s loading. Useful for example when Facebook widget is placed at the bottom of the page.


You can manage all options provided by Facebook Page Plugin inside widget settings. They are translatable — pull requests for new languages welcome.

There are also hooks for developers:

  • yafook_before_render and yafook_after_render actions are fired before and after widget's code rendering.
  • yafook_css_class filter may be used to change CSS class of widget's main container.

FacebookPageBox class

It's possible to use code generator class directly. There is no documentation — just read the code, it's simple.

use YAFookPageBox\FacebookPageBox;

$FB = new FacebookPageBox;

// Set fanpage URL here.

// Define visible tabs.
	FacebookPageBox::TAB_TIMELINE | FacebookPageBox::TAB_EVENTS | FacebookPageBox::TAB_MESSAGES
	// or: FacebookPageBox::TAB_TIMELINE | FacebookPageBox::TAB_MESSAGES
	// or: FacebookPageBox::TAB_NONE

// Set other Facebook widget settings.

// Set source code settings.

// Output widget code.
echo $FB;  // or: $FB->render();


Facebook Page Plugin as WordPress widget and standalone PHP class.





No packages published