Responsive Facebook Page Plugin - Version 1.0

Version Description

  • Initial release

=

Download this release

Release Info

Developer cameronjonesweb
Plugin Icon 128x128 Responsive Facebook Page Plugin
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (3) hide show
  1. facebook-page-feed-graph-api.php +69 -0
  2. readme.txt +48 -0
  3. screenshot-1.png +0 -0
facebook-page-feed-graph-api.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Facebook Page Feed (Graph API)
4
+ * Plugin URI: https://cameronjones.x10.mx/projects/facebook-page-plugin
5
+ * Description: Display the Facebook Page Plugin from the Graph API.
6
+ * Version: 1.0
7
+ * Author: Cameron Jones
8
+ * Author URI: http://cameronjones.x10.mx
9
+ * License: GPLv2
10
+
11
+ * Copyright 2015 Cameron Jones (email : cameronjonesweb@gmail.com)
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License, version 2, as
15
+ published by the Free Software Foundation.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
+
27
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
28
+
29
+ function facebook_page_plugin($filter) {
30
+ $return = NULL;
31
+ $a = shortcode_atts( array(
32
+ 'href' => NULL,
33
+ 'width' => NULL,
34
+ 'height' => NULL,
35
+ 'cover' => NULL,
36
+ 'facepile' => NULL,
37
+ 'posts' => NULL
38
+ ), $filter );
39
+ if(isset($a['href']) && !empty($a['href'])){
40
+ $return .= '<div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=191521884244670&version=v2.3";fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>';
41
+ $return .= '<div class="fb-page" data-href="http://facebook.com/' . $a["href"] . '" ';
42
+ if(isset($a['width']) && !empty($a['width'])){
43
+ $return .= ' data-width="' . $a['width'] . '"';
44
+ }
45
+ if(isset($a['height']) && !empty($a['height'])){
46
+ $return .= ' data-width="' . $a['height'] . '"';
47
+ }
48
+ if(isset($a['cover']) && !empty($a['cover'])){
49
+ switch($a['cover']){
50
+ case "true":
51
+ $a['cover'] = false;
52
+ break;
53
+ case "false":
54
+ $a['cover'] = true;
55
+ break;
56
+ }
57
+ $return .= ' data-hide-cover="' . $a['cover'] . '"';
58
+ }
59
+ if(isset($a['facepile']) && !empty($a['facepile'])){
60
+ $return .= ' data-show-facepile="' . $a['facepile'] . '"';
61
+ }
62
+ if(isset($a['posts']) && !empty($a['posts'])){
63
+ $return .= ' data-show-posts="true"';
64
+ }
65
+ $return .= '></div>';
66
+ }
67
+ return $return;
68
+ }
69
+ add_shortcode( 'facebook-page-plugin', 'facebook_page_plugin' );
readme.txt ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Facebook Page Plugin ===
2
+ Contributors: cameronjonesweb
3
+ Tags: facebook,social,like,facepile,activity feed,recommendations,shortcode
4
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=WLV5HPHSPM2BG&lc=AU&item_name=Cameron%20Jones%20Web%20Development�cy_code=AUD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
+ Requires at least: 4.0
6
+ Tested up to: 4.1.2
7
+ Stable tag: trunk
8
+ License: GPLv2
9
+ License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
+
11
+ Display the Facebook Page Plugin from the Graph API.
12
+
13
+ == Description ==
14
+ Facebook are depreciating many of their old social plugins on June 23rd 2015, including Activity Feed, Facepile, Like Box and Recommendations. As such, many WordPress plugins that utilise these social plugins will soon stop working. This plugin instead uses the Graph API v2.3 to guarantee your WordPress site continues to have full Facebook support.
15
+
16
+ This plugin is shortcode based, unlike many other Facebook social plugins that are available. Simply call the [facebook-page-plugin] shortcode and set your settings within the shortcode. Place it wherever you like, as often as you like.
17
+
18
+ == Installation ==
19
+ 1. Upload the entire `facebook-page-feed-graph-api` folder to the `/wp-content/plugins/` directory.
20
+ 1. Activate the plugin through the 'Plugins' menu in WordPress.
21
+ Usage: [facebook-page-plugin setting=\"value\"].
22
+ Available settings:
23
+ href (URL path that comes after facebook.com/)
24
+ width (number, in pixels, default 340)
25
+ height (number, in pixels, default 500)
26
+ cover (true/false, show page cover photo, default true)
27
+ facepile (true/false, show facepile, default true)
28
+ posts (true/false, display page posts, default false)
29
+ Example: [facebook-page-plugin href=\"facebook\" width=\"300\" height=\"500\" cover=\"true\" facepile=\"true\" posts=\"true\"]
30
+
31
+ == Frequently Asked Questions ==
32
+ = What languages are available? =
33
+ English.
34
+
35
+ = My Facebook page isn\'t loading =
36
+ If the URL for your page is http://facebook.com/ABC123 then when you use the shortcode don\'t include the domain, instead use like so: [facebook-page-plugin href=\"ABC123\"]
37
+ Also, if your page has only just been created it may take some time for the API to load the page. Just be patient
38
+
39
+ == Screenshots ==
40
+ 1. Installation example
41
+
42
+ == Changelog ==
43
+ = 1.0 =
44
+ * Initial release
45
+
46
+ == Upgrade Notice ==
47
+ = 1.0 =
48
+ Initial release
screenshot-1.png ADDED
Binary file