Skip to content

Commit

Permalink
Fix #47: Update Facebook Plugin for latest FB graph version
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Mar 14, 2016
1 parent 4050eb9 commit 244e9fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 58 deletions.
3 changes: 2 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ version 1.3.2 (under development)

- (enh #42): Add Italian Translations.
- (enh #43): Fix VK styles.
- (enh #46): Update to Facebook SDK release v5.0. (BC Breaking Change)
- (enh #46): Update to Facebook SDK release v5.0. (BC Breaking Change).
- (enh #47): Update Facebook Plugin for latest FB graph version (BC Breaking Change).
- Add branch alias for dev-master latest release.

version 1.3.1
Expand Down
22 changes: 8 additions & 14 deletions FacebookPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Yii;
use yii\base\InvalidConfigException;
use yii\helpers\Html;

/**
* Widget to render various Facebook plugins
Expand All @@ -32,13 +31,9 @@ class FacebookPlugin extends Widget
const SHARE = 'fb-share-button';
const SEND = 'fb-send';
const POST = 'fb-post';
const VIDEO = 'fb-video';
const FOLLOW = 'fb-follow';
const COMMENT = 'fb-comments';
const ACTIVITY = 'fb-activity';
const RECO = 'fb-recommendations';
const RECO_BAR = 'fb-recommendations-bar';
const LIKE_BOX = 'fb-like-box';
const FACEPILE = 'fb-facepile';
const PAGE = 'fb-page';

/**
Expand All @@ -52,7 +47,7 @@ class FacebookPlugin extends Widget
* defaults to Facebook Comments
*/
public $type = self::COMMENT;

/**
* @var bool whether to load facebook JS asynchronously.
* Defaults to `true`.
Expand All @@ -76,13 +71,9 @@ public function init()
self::SHARE,
self::SEND,
self::POST,
self::VIDEO,
self::FOLLOW,
self::COMMENT,
self::ACTIVITY,
self::RECO,
self::RECO_BAR,
self::LIKE_BOX,
self::FACEPILE,
self::PAGE,
];
parent::init();
Expand All @@ -94,7 +85,10 @@ public function init()
throw new InvalidConfigException("The Facebook 'appId' has not been set.");
}
if (!isset($this->noscript)) {
$this->noscript = Yii::t('kvsocial', 'Please enable JavaScript on your browser to view the Facebook {pluginName} plugin correctly on this site.', ['pluginName' => Yii::t('kvsocial', str_replace('fb-', '', $this->type))]
$this->noscript = Yii::t(
'kvsocial',
'Please enable JavaScript on your browser to view the Facebook {pluginName} plugin correctly on this site.',
['pluginName' => Yii::t('kvsocial', str_replace('fb-', '', $this->type))]
);
}
$this->registerAssets();
Expand Down Expand Up @@ -126,4 +120,4 @@ protected function registerAssets()
SCRIPT;
$view->registerJs($js);
}
}
}
38 changes: 0 additions & 38 deletions FacebookRedirectLoginHelperX.php

This file was deleted.

7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ Module that enables access to social plugins for Yii Framework 2.0. It includes
- Share Button
- Send Button
- Embedded Posts
- Embedded Videos
- Follow Button
- Comment Button
- Activity Feed
- Recommendations Feed
- Recommendations Bar
- Like Box
- Face Pile
- Page Plugin
- Google Plus
- Signin Plugin
- +1 Button
Expand Down

0 comments on commit 244e9fa

Please sign in to comment.