Social_Facebook - Version 2.1.0

Version Notes

Facebook Open Graph 2.0 extension is compatible with Magento Enterprise Edition and Professional Edition 1.11 or later, and Magento Community Edition 1.6 or later.

Download this release

Release Info

Developer Magento Core Team
Extension Social_Facebook
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.0 to 2.1.0

app/code/community/Social/Facebook/Helper/Data.php CHANGED
@@ -40,13 +40,6 @@ class Social_Facebook_Helper_Data extends Mage_Core_Helper_Abstract
40
  */
41
  public function isEnabled()
42
  {
43
- if (!class_exists('Xcom')) {
44
- Mage::throwException(
45
- Mage::helper('social_facebook')->__('The xcommerce extension wasn\'t loaded,
46
- please install and enable the X.commerce PHP5 extension'));
47
- return false;
48
- }
49
-
50
  return Mage::getStoreConfigFlag(Social_Facebook_Model_Facebook::XML_PATH_ENABLED);
51
  }
52
 
@@ -114,6 +107,16 @@ class Social_Facebook_Helper_Data extends Mage_Core_Helper_Abstract
114
  return Mage::getStoreConfig(Social_Facebook_Model_Facebook::XML_PATH_CAP_TOKEN);
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Get Facebook Actions
119
  *
40
  */
41
  public function isEnabled()
42
  {
 
 
 
 
 
 
 
43
  return Mage::getStoreConfigFlag(Social_Facebook_Model_Facebook::XML_PATH_ENABLED);
44
  }
45
 
107
  return Mage::getStoreConfig(Social_Facebook_Model_Facebook::XML_PATH_CAP_TOKEN);
108
  }
109
 
110
+ /**
111
+ * Get the bearer token
112
+ *
113
+ * @return string
114
+ */
115
+ public function getSCBearerToken()
116
+ {
117
+ return Mage::getStoreConfig(Social_Facebook_Model_Facebook::XML_PATH_BEARER_TOKEN);
118
+ }
119
+
120
  /**
121
  * Get Facebook Actions
122
  *
app/code/community/Social/Facebook/Model/Api.php CHANGED
@@ -31,6 +31,7 @@ class Social_Facebook_Model_Api extends Varien_Object
31
  const URL_GRAPH_FACEBOOK_ABOUT_ME = 'https://graph.facebook.com/me/';
32
  const URL_GRAPH_FACEBOOK_ME_FRIENDS = 'https://graph.facebook.com/me/friends';
33
  const URL_GRAPH_FACEBOOK_OBJECT_ID = 'https://graph.facebook.com/';
 
34
  const FB_ERR_ACTION_EXISTS = 3501;
35
  const HTTP_OK = 200;
36
 
@@ -117,48 +118,43 @@ class Social_Facebook_Model_Api extends Varien_Object
117
  }
118
 
119
  /**
120
- * send message to Xfabric
121
  *
122
  * @param object $params
123
  * @throws Mage_Core_Exception
124
  * @return int
125
  */
126
- public function makeXcomRequest($topic, $object, $schemaFile, $sync=false, $debug=false)
127
  {
128
- $httpCode = 0;
129
- $xcom = NULL;
130
  try {
131
- if (!$sync) {
132
- $xcom = $this->getXcom();
133
- } else {
134
- $xcom = $this->getXcomSync();
135
- }
136
-
137
- if ($debug) {
138
- $xcom->__debug = true;
139
- }
140
-
141
- $fileLocation = $this->getSchemaLocation($schemaFile);
142
 
143
- if (!is_readable($fileLocation)) {
144
- Mage::throwException(Mage::helper('social_facebook')->__('Unable to load schema file: %s'),
145
- $fileLocation);
146
- }
 
 
 
 
 
147
 
148
- $httpCode = $xcom->send($topic, $object, file_get_contents($fileLocation), '1.0');
 
149
  } catch (Exception $e) {
150
  Mage::logException($e);
 
151
  }
152
 
153
- if ($httpCode!=self::HTTP_OK) {
154
  try {
155
- Mage::throwException(Mage::helper('social_facebook')->__( 'Error sending message to fabric, HTTP CODE: %s', $httpCode));
156
  } catch(Exception $e) {
157
  Mage::logException($e);
158
  }
159
  }
160
 
161
- return $httpCode;
162
  }
163
 
164
  /**
@@ -401,8 +397,6 @@ class Social_Facebook_Model_Api extends Varien_Object
401
  public function fetchSocialData($productData, $categoryData) {
402
  $dataObj = new stdClass();
403
 
404
- $schema = 'social.events.product.fetch.json';
405
-
406
  $data = array('actions' => Mage::helper('social_facebook')->getAllActions(),
407
  'url' => Mage::app()->getStore()->getCurrentUrl(false));
408
 
@@ -435,14 +429,11 @@ class Social_Facebook_Model_Api extends Varien_Object
435
 
436
  $data['product_info'] = array('product' => $productData, 'category' => $categoryData);
437
 
438
- $dataObj->social = Mage::helper('core')->jsonEncode($data);
439
-
440
- $this->makeXcomRequest('/social/events/product/fetch', $dataObj, $schema, true);
441
 
442
- $response = $this->getXcomSync()->decode($this->getXcomSync()->getLastResponse(),
443
- file_get_contents($this->getSchemaLocation($schema)));
444
 
445
- $json = Mage::helper('core')->jsonDecode($response->social, Zend_Json::TYPE_OBJECT);
446
 
447
  if (empty($json)) {
448
  return false;
31
  const URL_GRAPH_FACEBOOK_ABOUT_ME = 'https://graph.facebook.com/me/';
32
  const URL_GRAPH_FACEBOOK_ME_FRIENDS = 'https://graph.facebook.com/me/friends';
33
  const URL_GRAPH_FACEBOOK_OBJECT_ID = 'https://graph.facebook.com/';
34
+ const URL_SC_API_SERVER = 'https://sc.jawed.name/xcomsocialcom/';
35
  const FB_ERR_ACTION_EXISTS = 3501;
36
  const HTTP_OK = 200;
37
 
118
  }
119
 
120
  /**
121
+ * send message to SC
122
  *
123
  * @param object $params
124
  * @throws Mage_Core_Exception
125
  * @return int
126
  */
127
+ public function makeXcomRequest($topic, $json)
128
  {
 
 
129
  try {
130
+ $client = new Varien_Http_Client();
 
 
 
 
 
 
 
 
 
 
131
 
132
+ $client->setUri(self::URL_SC_API_SERVER . $topic);
133
+ $client->setConfig(array(
134
+ 'adapter' => 'Zend_Http_Client_Adapter_Curl',
135
+ 'timeout' => 4,
136
+ 'curloptions' => array(CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_CAINFO => Mage::getModuleDir('etc', 'Social_Facebook') . '/cainfo.crt'),
137
+ ));
138
+ $client->setMethod('POST');
139
+ $client->setParameterPost('social', $json);
140
+ $client->setHeaders('Authorization', Mage::helper('social_facebook')->getSCBearerToken());
141
 
142
+ $response = $client->request();
143
+ $result = Mage::helper('core')->jsonDecode($response->getBody(), Zend_Json::TYPE_OBJECT);
144
  } catch (Exception $e) {
145
  Mage::logException($e);
146
+ $result = $response->getBody();
147
  }
148
 
149
+ if ($response->getStatus()!=self::HTTP_OK) {
150
  try {
151
+ Mage::throwException(Mage::helper('social_facebook')->__( 'Error sending message to the Social Commerce API, HTTP CODE: %s', $response->getStatus()));
152
  } catch(Exception $e) {
153
  Mage::logException($e);
154
  }
155
  }
156
 
157
+ return array($response->getStatus(), $result);
158
  }
159
 
160
  /**
397
  public function fetchSocialData($productData, $categoryData) {
398
  $dataObj = new stdClass();
399
 
 
 
400
  $data = array('actions' => Mage::helper('social_facebook')->getAllActions(),
401
  'url' => Mage::app()->getStore()->getCurrentUrl(false));
402
 
429
 
430
  $data['product_info'] = array('product' => $productData, 'category' => $categoryData);
431
 
432
+ $dataObj = Mage::helper('core')->jsonEncode($data);
 
 
433
 
434
+ list($rc, $response) = $this->makeXcomRequest('/social/events/product/fetch', $dataObj);
 
435
 
436
+ $json = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
437
 
438
  if (empty($json)) {
439
  return false;
app/code/community/Social/Facebook/Model/Facebook.php CHANGED
@@ -46,13 +46,13 @@ class Social_Facebook_Model_Facebook extends Mage_Core_Model_Abstract
46
  const XML_PATH_APP_ACTIONS = 'facebook/config/action';
47
  const XML_PATH_FABRIC_URL = 'facebook/config/fabric_url';
48
  const XML_PATH_CAP_TOKEN = 'facebook/config/cap_token';
 
49
  const XML_PATH_TENANT_NAME = 'facebook/config/tenant_name';
50
  const XML_PATH_RAW_AUTH_JSON = 'facebook/config/raw_json_auth';
51
  const XML_PATH_REGISTER_BUTTON = 'facebook/config/registration_extension_button';
52
  const ONBOARDING_URL = '/merchant_onboarding';
53
  const ONBOARDING_URL_DOMAIN = 'https://devportal.x.com';
54
  const NEW_EVENT_TOPIC = '/social/events/product/new';
55
- const NEW_EVENT_SCHEMA = 'social.events.product.new.json';
56
 
57
  protected $_accessToken = false;
58
 
@@ -323,7 +323,9 @@ class Social_Facebook_Model_Facebook extends Mage_Core_Model_Abstract
323
  $dataObj->merchant_info = Mage::helper('core')->jsonEncode($merchantData);
324
  $dataObj->event_info = Mage::helper('core')->jsonEncode($eventInfo);
325
 
326
- $this->getApi()->makeXcomRequest(self::NEW_EVENT_TOPIC, $dataObj, self::NEW_EVENT_SCHEMA);
 
 
327
  } catch (Mage_Core_Exception $e) {
328
  Mage::getSingleton('core/session')->addError($e->getMessage());
329
  return false;
46
  const XML_PATH_APP_ACTIONS = 'facebook/config/action';
47
  const XML_PATH_FABRIC_URL = 'facebook/config/fabric_url';
48
  const XML_PATH_CAP_TOKEN = 'facebook/config/cap_token';
49
+ const XML_PATH_BEARER_TOKEN = 'facebook/config/bearer_token';
50
  const XML_PATH_TENANT_NAME = 'facebook/config/tenant_name';
51
  const XML_PATH_RAW_AUTH_JSON = 'facebook/config/raw_json_auth';
52
  const XML_PATH_REGISTER_BUTTON = 'facebook/config/registration_extension_button';
53
  const ONBOARDING_URL = '/merchant_onboarding';
54
  const ONBOARDING_URL_DOMAIN = 'https://devportal.x.com';
55
  const NEW_EVENT_TOPIC = '/social/events/product/new';
 
56
 
57
  protected $_accessToken = false;
58
 
323
  $dataObj->merchant_info = Mage::helper('core')->jsonEncode($merchantData);
324
  $dataObj->event_info = Mage::helper('core')->jsonEncode($eventInfo);
325
 
326
+ $data = Mage::helper('core')->jsonEncode($dataObj);
327
+
328
+ $this->getApi()->makeXcomRequest(self::NEW_EVENT_TOPIC, $data);
329
  } catch (Mage_Core_Exception $e) {
330
  Mage::getSingleton('core/session')->addError($e->getMessage());
331
  return false;
app/code/community/Social/Facebook/controllers/IndexController.php CHANGED
@@ -108,18 +108,10 @@ class Social_Facebook_IndexController extends Mage_Core_Controller_Front_Action
108
  return;
109
  }
110
 
111
- if (!extension_loaded('xcommerce')) {
112
  $this->getResponse()->setBody(Mage::helper('social_facebook')->__("
113
  <strong>[error]</strong> you've enabled the Social Commerce extension
114
- but haven't setup the xcommerce PHP extension yet,
115
- you can download it at http://pecl.php.net/xcommerce"));
116
- return;
117
- }
118
-
119
- if (!Mage::helper('social_facebook')->getXcomFabricURL()) {
120
- $this->getResponse()->setBody(Mage::helper('social_facebook')->__("
121
- <strong>[error]</strong> you've enabled the Social Commerce extension
122
- but haven't uploaded a valid X.commerce authorization file yet!"));
123
  return;
124
  }
125
 
108
  return;
109
  }
110
 
111
+ if (!Mage::helper('social_facebook')->getSCBearerToken()) {
112
  $this->getResponse()->setBody(Mage::helper('social_facebook')->__("
113
  <strong>[error]</strong> you've enabled the Social Commerce extension
114
+ but haven't set a Social Commerce App Secret yet!"));
 
 
 
 
 
 
 
 
115
  return;
116
  }
117
 
app/code/community/Social/Facebook/etc/cainfo.crt ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx
3
+ ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
4
+ RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw
5
+ MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH
6
+ QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j
7
+ b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j
8
+ b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHkgU2VjdXJlIENlcnRpZmlj
9
+ YXRpb24gQXV0aG9yaXR5MREwDwYDVQQFEwgwNzk2OTI4NzCCASIwDQYJKoZIhvcN
10
+ AQEBBQADggEPADCCAQoCggEBAMQt1RWMnCZM7DI161+4WQFapmGBWTtwY6vj3D3H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yz2h
44
+ /t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
45
+ IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
46
+ YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
47
+ ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
48
+ OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
49
+ TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
50
+ HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
51
+ dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
52
+ ReYNnyicsbkqWletNw+vHX/bvZ8=
53
+ -----END CERTIFICATE-----
app/code/community/Social/Facebook/etc/system.xml CHANGED
@@ -96,27 +96,16 @@
96
  <validate>required-entry</validate>
97
  <comment>Create a 'product' (or equivalent) object and associate the actions you want to it at https://developers.facebook.com/</comment>
98
  </otype>
99
- <!--<fabric_url translate="label" module="social_facebook">
100
- <validate>validate-url required-entry</validate>
101
- <label>X.Commerce Fabric URL</label>
102
  <frontend_type>text</frontend_type>
 
103
  <show_in_default>1</show_in_default>
104
- <show_in_website>0</show_in_website>
105
  <show_in_store>0</show_in_store>
106
- <comment>
107
- Sandbox URL: https://api.sandbox.x.com/fabric&lt;br&gt;
108
- Production URL: https://api.x.com/fabric
109
- </comment>
110
- </fabric_url>
111
- <cap_token translate="label" module="social_facebook">
112
  <validate>required-entry</validate>
113
- <label>X.Commerce Capability Token</label>
114
- <frontend_type>text</frontend_type>
115
- <show_in_default>1</show_in_default>
116
- <show_in_website>0</show_in_website>
117
- <show_in_store>0</show_in_store>
118
- <required>1</required>
119
- </cap_token>-->
120
  <action translate="comment">
121
  <label>Actions Settings</label>
122
  <frontend_model>social_facebook/adminhtml_facebuttons</frontend_model>
@@ -127,35 +116,6 @@
127
  <show_in_store>1</show_in_store>
128
  <comment>Add the actions that you want. These need to be approved by Facebook (usually within 24 hours) before non-developers of your application can use them.</comment>
129
  </action>
130
- <auth_file_upload translate="label">
131
- <frontend_type>file</frontend_type>
132
- <backend_model>social_facebook/system_config_backend_authorization</backend_model>
133
- <label>X.commerce Authorization File</label>
134
- <sort_order>22</sort_order>
135
- <show_in_default>1</show_in_default>
136
- <show_in_website>0</show_in_website>
137
- <show_in_store>0</show_in_store>
138
- </auth_file_upload>
139
- <registration_extension_button traslate="button_label comment">
140
- <label/>
141
- <frontend_model>social_facebook/adminhtml_system_form_renderer_config_registerButton</frontend_model>
142
- <button_label>Generate an X.commerce Authorization File</button_label>
143
- <sort_order>21</sort_order>
144
- <show_in_default>1</show_in_default>
145
- <show_in_website>0</show_in_website>
146
- <show_in_store>0</show_in_store>
147
- <comment><![CDATA[Click the button above to generate an X.Commerce authorization file if you don't have one.]]></comment>
148
- </registration_extension_button>
149
- <authorize_extension_button traslate="button_label comment">
150
- <label/>
151
- <frontend_model>social_facebook/adminhtml_system_form_renderer_config_authButton</frontend_model>
152
- <button_label>Authorize the Social Commerce Extension</button_label>
153
- <sort_order>22</sort_order>
154
- <show_in_default>1</show_in_default>
155
- <show_in_website>0</show_in_website>
156
- <show_in_store>0</show_in_store>
157
- <comment><![CDATA[After you upload your authorization file from x.com you'll need to authorize this extension (<strong>make sure you're logged out of x.com before each of these steps</strong>).]]></comment>
158
- </authorize_extension_button>
159
  </fields>
160
  </config>
161
  </groups>
96
  <validate>required-entry</validate>
97
  <comment>Create a 'product' (or equivalent) object and associate the actions you want to it at https://developers.facebook.com/</comment>
98
  </otype>
99
+ <bearer_token translate="label" module="social_facebook">
100
+ <label>Social Commerce App Secret</label>
 
101
  <frontend_type>text</frontend_type>
102
+ <sort_order>21</sort_order>
103
  <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
  <show_in_store>0</show_in_store>
 
 
 
 
 
 
106
  <validate>required-entry</validate>
107
+ <comment><![CDATA[You can provision this @ <strong>https://sc.jawed.name/</strong>]]></comment>
108
+ </bearer_token>
 
 
 
 
 
109
  <action translate="comment">
110
  <label>Actions Settings</label>
111
  <frontend_model>social_facebook/adminhtml_facebuttons</frontend_model>
116
  <show_in_store>1</show_in_store>
117
  <comment>Add the actions that you want. These need to be approved by Facebook (usually within 24 hours) before non-developers of your application can use them.</comment>
118
  </action>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  </fields>
120
  </config>
121
  </groups>
app/design/frontend/base/default/template/social/facebook/socialdata.phtml CHANGED
@@ -1,7 +1,7 @@
1
  <div id="social_facebook_block"></div>
2
  <script>
3
  new Ajax.Updater('social_facebook_block', '<?php
4
- echo Mage::getUrl('facebook/index/widget/', array('id' => urlencode((int)$this->getRequest()->getParam('id'))));
5
  ?>', {
6
  method: 'get'
7
  });
1
  <div id="social_facebook_block"></div>
2
  <script>
3
  new Ajax.Updater('social_facebook_block', '<?php
4
+ echo Mage::getUrl('facebook/index/widget/', array('id' => urlencode((int)$this->getRequest()->getParam('id')),'_secure' => true));
5
  ?>', {
6
  method: 'get'
7
  });
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Social_Facebook</name>
4
- <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Facebook Open Graph Extension for Magento</summary>
10
- <description>Facebook Open Graph 2.0 extension allows merchants to add new social buttons to their store which results in higher click-to-sale, and upsells. The extension uses Facebook Open Graph 2.0 protocol which allows merchants to add Facebook action buttons on product pages. It is built on top of the X.commerce commerce OS.</description>
11
  <notes>Facebook Open Graph 2.0 extension is compatible with Magento Enterprise Edition and Professional Edition 1.11 or later, and Magento Community Edition 1.6 or later.</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
- <date>2012-08-23</date>
14
- <time>22:00:21</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Social_Facebook.xml" hash="b15af76b10945d00b8dbad23aebc0f50"/></dir></target><target name="magecommunity"><dir name="Social"><dir name="Facebook"><dir name="Block"><file name="Action.php" hash="3804657fa2a304d87c51f92e5ae61d27"/><file name="Box.php" hash="f856c36c36a826fc5848d6a1dc2350c2"/><file name="Head.php" hash="0f03a964f526eacb27877cbf43c31cff"/><file name="Socialdata.php" hash="36466e7a19a065bd0558c21e59b6ab63"/><file name="Start.php" hash="f37f21ecb2990a4b08e27a635a5b577a"/><dir name="Adminhtml"><file name="Facebuttons.php" hash="545099576c8530dac2c7d50c49709b10"/><file name="Select.php" hash="0835b7782edfdfa900a65b397acfd7f5"/><dir name="System"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="AuthButton.php" hash="7a9736e4b09150450a480d1867536d8b"/><file name="RegisterButton.php" hash="f871a32f3f66a6496ea30a7948be2886"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="6572649784b8c1da1983d5ab6732dfb9"/></dir><dir name="Model"><file name="Api.php" hash="ae7171794d29b812455bdee69bbaae5f"/><file name="Facebook.php" hash="1188300b052f28a0b90843e9000278f4"/><file name="Facebuttons.php" hash="174e8d6bbc004115bfe56b2a3933acc9"/><file name="Observer.php" hash="5d4c49602ffe0e437b73800e7d94e369"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Authorization.php" hash="94043f184d8909f04f93fdb91fc77d9f"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="807b7bf1bc93c9a3f1aec69736b93a58"/></dir><dir name="etc"><file name="adminhtml.xml" hash="357bed8aa09d3c21de1e255eeb656bc8"/><file name="config.xml" hash="0ec6e711a3b58ec35eb64823182c27e8"/><file name="social.events.product.fetch.json" hash="6e70834b3deb5a79000c6611c96403cc"/><file name="social.events.product.fetchSucceeded.json" hash="a26bdb243def788240cd74e83eb46944"/><file name="social.events.product.new.json" hash="c54901dccdc338263d2a62ec701ed84c"/><file name="system.tenant.relationship.created.json" hash="a9c359bd51e95fa34727d6c85e8a9aed"/><file name="system.xml" hash="8eb20913e0b6841c849760b5c35833e3"/><file name="xfabric.tenant.updated.json" hash="352322878e26806949308dc98d97538a"/></dir><dir name="locale"><file name="Social_Facebook.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="facebook.css" hash="3640ca91d7edf266c097e5afafe81de9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="social"><dir name="facebook"><file name="action.phtml" hash="3f037aefeb2c1972bae4f9f4bce6db16"/><file name="box.phtml" hash="9ec7546cc97898048712e4e4c106b580"/><file name="empty.phtml" hash="be36fe9381fb91ce85af00a3ae583396"/><file name="page.phtml" hash="81bef9f0829d6b5718f8aecc3dd5a88f"/><file name="socialdata.phtml" hash="3c30ce6b4cd6f4077a57b9f8e9204171"/></dir></dir></dir><dir name="layout"><file name="facebook.xml" hash="c18c812d68d18dc40b47f22c456033c5"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="social"><dir name="facebook"><dir name="system"><dir name="config"><file name="button.phtml" hash="f60245da1dfc1d6c8d2dd54f501043cb"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>PDO</name><min>1.0.0</min><max>10.0.0</max></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Social_Facebook</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Facebook Open Graph Extension for Magento</summary>
10
+ <description>Facebook Open Graph 2.0 extension allows merchants to add new social buttons to their store which results in higher click-to-sale, and upsells. The extension uses Facebook Open Graph 2.0 protocol which allows merchants to add Facebook action buttons on product pages.</description>
11
  <notes>Facebook Open Graph 2.0 extension is compatible with Magento Enterprise Edition and Professional Edition 1.11 or later, and Magento Community Edition 1.6 or later.</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
+ <date>2013-01-02</date>
14
+ <time>07:28:47</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Social_Facebook.xml" hash="b15af76b10945d00b8dbad23aebc0f50"/></dir></target><target name="magecommunity"><dir name="Social"><dir name="Facebook"><dir name="Block"><file name="Action.php" hash="3804657fa2a304d87c51f92e5ae61d27"/><dir><dir name="Adminhtml"><file name="Facebuttons.php" hash="545099576c8530dac2c7d50c49709b10"/><file name="Select.php" hash="0835b7782edfdfa900a65b397acfd7f5"/><dir name="System"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="AuthButton.php" hash="7a9736e4b09150450a480d1867536d8b"/><file name="RegisterButton.php" hash="f871a32f3f66a6496ea30a7948be2886"/></dir></dir></dir></dir></dir></dir><file name="Box.php" hash="f856c36c36a826fc5848d6a1dc2350c2"/><file name="Head.php" hash="0f03a964f526eacb27877cbf43c31cff"/><file name="Socialdata.php" hash="36466e7a19a065bd0558c21e59b6ab63"/><file name="Start.php" hash="f37f21ecb2990a4b08e27a635a5b577a"/><dir name="Adminhtml"><file name="Facebuttons.php" hash="545099576c8530dac2c7d50c49709b10"/><file name="Select.php" hash="0835b7782edfdfa900a65b397acfd7f5"/><dir name="System"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="AuthButton.php" hash="7a9736e4b09150450a480d1867536d8b"/><file name="RegisterButton.php" hash="f871a32f3f66a6496ea30a7948be2886"/><file name="AuthButton.php" hash="7a9736e4b09150450a480d1867536d8b"/><file name="RegisterButton.php" hash="f871a32f3f66a6496ea30a7948be2886"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="9d0e16a0366181bcee404a19bbc63b89"/></dir><dir name="Model"><file name="Api.php" hash="b78c21853aafb7d64c017f49046c3c96"/><file name="Facebook.php" hash="b336994417ce896a6bc002c29a6b0140"/><file name="Facebuttons.php" hash="174e8d6bbc004115bfe56b2a3933acc9"/><file name="Observer.php" hash="5d4c49602ffe0e437b73800e7d94e369"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Authorization.php" hash="94043f184d8909f04f93fdb91fc77d9f"/><file name="Authorization.php" hash="94043f184d8909f04f93fdb91fc77d9f"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="b47cf089b908303e72d509f69a6d2ff2"/></dir><dir name="etc"><file name="adminhtml.xml" hash="357bed8aa09d3c21de1e255eeb656bc8"/><file name="cainfo.crt" hash="d71190e16258f8ba11959e711b85a87b"/><file name="config.xml" hash="0ec6e711a3b58ec35eb64823182c27e8"/><file name="social.events.product.fetch.json" hash="6e70834b3deb5a79000c6611c96403cc"/><file name="social.events.product.fetchSucceeded.json" hash="a26bdb243def788240cd74e83eb46944"/><file name="social.events.product.new.json" hash="c54901dccdc338263d2a62ec701ed84c"/><file name="system.tenant.relationship.created.json" hash="a9c359bd51e95fa34727d6c85e8a9aed"/><file name="system.xml" hash="896bbe2934346e1ddd555a7132525fc5"/><file name="xfabric.tenant.updated.json" hash="352322878e26806949308dc98d97538a"/></dir><dir name="locale"><file name="Social_Facebook.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="facebook.css" hash="3640ca91d7edf266c097e5afafe81de9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="social"><dir name="facebook"><file name="action.phtml" hash="3f037aefeb2c1972bae4f9f4bce6db16"/><file name="box.phtml" hash="9ec7546cc97898048712e4e4c106b580"/><file name="empty.phtml" hash="be36fe9381fb91ce85af00a3ae583396"/><file name="page.phtml" hash="81bef9f0829d6b5718f8aecc3dd5a88f"/><file name="socialdata.phtml" hash="55c1a7823c4381b747fd1391d5863f18"/></dir></dir></dir><dir name="layout"><file name="facebook.xml" hash="c18c812d68d18dc40b47f22c456033c5"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="social"><dir name="facebook"><dir name="system"><dir name="config"><file name="button.phtml" hash="f60245da1dfc1d6c8d2dd54f501043cb"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>PDO</name><min>1.0.0</min><max>10.0.0</max></extension></required></dependencies>
18
  </package>