YaWK
24.1
Yet another WebKit
|
Facebook Gallery Widget - grab photos from your Facebook albums. More...
Public Member Functions | |
__construct ($db) | |
fbGallery constructor. Get widget settings into this->settings array and call checkRequirements More... | |
checkAccessToken () | |
Check if access token is correctly set. Returns true or abort with an error message. More... | |
checkAlbumId () | |
Check if album id is correctly set. Returns true or abort with an error message. More... | |
checkApiObjectData () | |
Check if api object is set and not empty. More... | |
checkAppId () | |
Check if App ID is set, not empty and numeric. Returns true if app ID is ok or abort with an error message. More... | |
checkRequirements () | |
Check if all requirements are fulfilled to perform api call. More... | |
drawGallery () | |
The heart of this widget: this method draws the gallery. More... | |
loadJSSDK () | |
Load Facebook JS Code. More... | |
makeApiCall () | |
Prepare object data, set json link, make API call and return apiObject. More... | |
Public Attributes | |
$apiObject | |
$fbGalleryAccessToken = '' | |
$fbGalleryAlbumId = '' | |
$fbGalleryAppId = '' | |
$fbGalleryEndDate = '' | |
$fbGalleryFields = 'images,source,name,id' | |
$fbGalleryFixedImageHeight = 'auto' | |
$fbGalleryGraphRequest = '/albums/' | |
$fbGalleryHeading = '' | |
$fbGalleryImageInfo = 1 | |
$fbGalleryLayout = 6 | |
$fbGalleryLimit = 0 | |
$fbGallerySortation = 'desc' | |
$fbGalleryStartDate = '' | |
$fbGallerySubtext = '' | |
$fbGalleryType = 'past' | |
$fbGalleryYearRange = '10' | |
$jsSDKLoaded = 'false' | |
$settings | |
$shuffle = 0 | |
$sinceDate = '' | |
$untilDate = '' | |
Facebook Gallery Widget - grab photos from your Facebook albums.
Use Facebook Graph API to get album photos from a Facebook Page. Requires an App ID and a valid access token.
With this widget, you are able to embed photos from your facebook page onto your website. It helps you to keep your website up to date. Have you ever been bored of adding the same content twice? If you change your facebook photo album the data on your website will be updated automatically.
You need an APP ID, as well as a valid access token for the facebook page you want to embed photos from. For reasons, you (respectively the app id / access token) needs administrative access rights to the facebook page you want to grab photos from. Create a new fb gallery widget in the backend, enter app id, access token and press save widget settings. The page reloads and your albums will get loaded into a select field.
Definition at line 23 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::__construct | ( | $db | ) |
fbGallery constructor. Get widget settings into this->settings array and call checkRequirements
$db |
Definition at line 76 of file fbGallery.php.
References $db, $value, and YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkRequirements().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::checkAccessToken | ( | ) |
Check if access token is correctly set. Returns true or abort with an error message.
Definition at line 126 of file fbGallery.php.
References die.
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkRequirements().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::checkAlbumId | ( | ) |
Check if album id is correctly set. Returns true or abort with an error message.
Definition at line 149 of file fbGallery.php.
References die.
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkRequirements().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::checkApiObjectData | ( | ) |
Check if api object is set and not empty.
Definition at line 283 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::checkAppId | ( | ) |
Check if App ID is set, not empty and numeric. Returns true if app ID is ok or abort with an error message.
Definition at line 103 of file fbGallery.php.
References die.
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkRequirements(), and YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\loadJSSDK().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::checkRequirements | ( | ) |
Check if all requirements are fulfilled to perform api call.
Definition at line 92 of file fbGallery.php.
References YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkAccessToken(), YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkAlbumId(), and YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkAppId().
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\__construct().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::drawGallery | ( | ) |
The heart of this widget: this method draws the gallery.
Definition at line 298 of file fbGallery.php.
References $i, $value, die, YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\loadJSSDK(), and YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\makeApiCall().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::loadJSSDK | ( | ) |
Load Facebook JS Code.
Definition at line 171 of file fbGallery.php.
References YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\checkAppId().
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\drawGallery().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::makeApiCall | ( | ) |
Prepare object data, set json link, make API call and return apiObject.
Definition at line 213 of file fbGallery.php.
References YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\$apiObject, and date.
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\drawGallery().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$apiObject |
object | api result (as object) |
Definition at line 66 of file fbGallery.php.
Referenced by YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery\makeApiCall().
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryAccessToken = '' |
string | your access token (secret word from developers.facebook.com) |
Definition at line 30 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryAlbumId = '' |
string | your page ID (http://facebook.com/{YOURPAGEID} |
Definition at line 28 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryAppId = '' |
string | your app ID (from developers.facebook.com) |
Definition at line 26 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryEndDate = '' |
string | user defined end date |
Definition at line 40 of file fbGallery.php.
string | fields that should be selected from facebook graph |
Definition at line 34 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryFixedImageHeight = 'auto' |
string | fixed image height in pixels or auto (select field) |
Definition at line 58 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryGraphRequest = '/albums/' |
string | your graph request (the Album ID) |
Definition at line 32 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryHeading = '' |
string | gallery heading |
Definition at line 44 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryImageInfo = 1 |
int | show info under the gallery? 0|1 |
Definition at line 56 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryLayout = 6 |
int | layout |
Definition at line 54 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryLimit = 0 |
int | limit entries to (n) |
Definition at line 50 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGallerySortation = 'desc' |
string | sortation |
Definition at line 52 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryStartDate = '' |
string | user defined start date |
Definition at line 38 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGallerySubtext = '' |
string | gallery small subtext beside heading |
Definition at line 46 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryType = 'past' |
string | which items should be shown? future|past|all |
Definition at line 42 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$fbGalleryYearRange = '10' |
string | show ITEMS of this time range |
Definition at line 36 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$jsSDKLoaded = 'false' |
string | true|false was the js SDK loaded? |
Definition at line 64 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$settings |
array | temporary settings array |
Definition at line 68 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$shuffle = 0 |
int | shuffle 0|1 if true, images get shuffled on page load |
Definition at line 60 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$sinceDate = '' |
string | ITEMS since this date (used for calc) |
Definition at line 48 of file fbGallery.php.
YAWK\WIDGETS\FACEBOOK\GALLERY\fbGallery::$untilDate = '' |
string | ITEMS until this date (used for calc) |
Definition at line 62 of file fbGallery.php.