<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gj |</title>
	<atom:link href="https://blog.gaiterjones.com/category/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/category/facebook/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Fri, 03 Mar 2017 08:55:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>
	<item>
		<title>Facebook API v2.0 Ubuntu PHP 5.4 #fail</title>
		<link>https://blog.gaiterjones.com/facebook-api-v2-0-ubuntu-php5-4-fail/</link>
					<comments>https://blog.gaiterjones.com/facebook-api-v2-0-ubuntu-php5-4-fail/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Tue, 22 Jul 2014 15:33:49 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook API]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1193</guid>

					<description><![CDATA[So I finally caught on to the fact that Facebook released version 2.0 of their API at the end of April (to coincide with the F8 developer conference.) and will discontinue...<a class="more-link" href="https://blog.gaiterjones.com/facebook-api-v2-0-ubuntu-php5-4-fail/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>So I finally caught on to the fact that Facebook released <a href="https://developers.facebook.com/docs/apps/changelog" target="_blank">version 2.0 of their API </a>at the end of April (to coincide with the F8 developer conference.) and will discontinue pre v2.0 API calls in April 2015.</p>
<p>I thought I had better take a look as I support a number of PHP apps that run on Facebook or integrate with Facebook for login/authentication etc.</p>
<p>v2.0 of the Facebook API has been completely rewritten from the fairly basic previous API code that I had been using, there are a lot of changes including new login features and permissions.</p>
<p>&#8216;This is great&#8217;, I thought&#8230;</p>
<h2>Facebook PHP API v2.0 requires PHP v5.4</h2>
<p>However there is a problem that will cause a whole lot of people a whole lot of problems. <strong>The new PHP SDK for v2.0 of the API requires PHP v5.4</strong>.</p>
<pre><em>if (version_compare(PHP_VERSION, '5.4.0', '&lt;')) {</em>
<em> throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.');</em>
<em>}</em></pre>
<p>My main production server runs the latest (as of the time of writing) LTS of Ubuntu v12.04, it&#8217;s up to date but a quick <em>php -v</em> from the command line reveals</p>
<p><em>PHP 5.3.10-1ubuntu3.13</em></p>
<p>The 14.04 LTS is not available to apt until the first point release which I think is any day now. 14.04 LTS will include PHP 5.5, but I&#8217;m not really planning on upgrading my live server straight away, 12.04 LTS is supported up to 2018 &#8211; that&#8217;s what <em>Long Term Support</em> means.</p>
<p>I currently work with live production Ubuntu servers ranging from v8 to 12 that I would not even dream of trying to upgrade.</p>
<p>Bearing in mind that a whole lot of people won&#8217;t even be running an Ubuntu version above 12 on their production servers getting to PHP 5.4 is going to present them with a considerable upgrade challenge.</p>
<p>You are going to have to be pretty brave to <a href="http://askubuntu.com/questions/109404/how-do-i-install-latest-php-in-supported-ubuntu-versions-like-5-4-x-in-ubuntu-1" target="_blank">manually upgrade PHP</a>, and if you do it without proper testing then you are also going to have to be particularly stupid.</p>
<p>Upgrading PHP without testing is going to break applications that are running PHP code that has been deprecated, older versions of Magento spring to mind, not to mention the problem people who are on a virtual or shared hosted systems where they have absolutely no control of the version of PHP running on their server.</p>
<h2>Facebook #fail</h2>
<p>So it looks like it&#8217;s a real <strong>#fail</strong> from Facebook to implement a PHP SDK totally dependent on a PHP version that a lot of people are not running and possibly cannot run.</p>
<p>What does this mean for your existing Facebook apps?</p>
<ul>
<li>For apps that existed before April 30th 2014, making an API call without specifying a version number (&#8216;unversioned&#8217;) is equivalent to making a call to the v1.0 of the API.</li>
<li>For apps created on or after April 30th 2014, making an API call without a specifing a version number is equivalent to making a call to v2.0 of the API.</li>
<li>Apps that were inactive or have a creation date on or after April 30th, 2014 will not be able to make calls to v1.0 of the API. They must use v2.0.</li>
</ul>
<p>This means your existing pre April 30th 2014 apps will be allowed to still make pre v2.0 api calls until April 30th 2015 after that they will <strong>stop working</strong>.</p>
<ul>
<li>If you want to create a new Facebook App you have to use the v2.0 API.</li>
<li>Inactive apps will no longer work. (define inactive please Facebook.)</li>
<li>if you want to create a new Facebook App you need to upgrade to PHP 5.4 or for Ubuntu admins be running the latest LTS (14.04).</li>
<li>if you have code on <a href="http://codecanyon.net/forums/thread/version-20-of-facebook-api/136471" target="_blank">Envato </a>using the old API it will be removed in August 2014 &#8211; goodbye to my Magento Facebook storefront!</li>
</ul>
<h2>Man this sucks</h2>
<p>I think this really sucks, especially if you are authenticating users via Facebook login if you don&#8217;t do anything your users will not be able to login to your website after April 30th 2015. I am kinda glad I didn&#8217;t implement that Facebook login feature on our eCommerce site now&#8230;</p>
<p>if your eCommerce site is running on shared hosting, or does not support PHP5.4 (i.e. Magento 1.3x) then you are pretty well stuffed I think.</p>
<p>The new API has a learning curve for devs too and I am already coming to this pretty late so I guess I better look at what options I have and what apps are going to stop working next year if I do nothing, or am unable to get my code and server to PHP 5.4 by then.</p>
<p>Having said all this I would bet my bottom dollar that Facebook change these deadlines and extends the v1.0 API support beyond 2015 &#8211; watch this space&#8230;</p>
<p>Because I am now depressed I am going to include a funny picture to cheer me up.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-1199 " src="https://blog.gaiterjones.com/wp-content/uploads/2014/07/silly-animals-doing-funny-things.jpg" alt="silly-animals-doing-funny-things" width="618" height="392" srcset="https://blog.gaiterjones.com/wp-content/uploads/2014/07/silly-animals-doing-funny-things.jpg 675w, https://blog.gaiterjones.com/wp-content/uploads/2014/07/silly-animals-doing-funny-things-440x278.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2014/07/silly-animals-doing-funny-things-620x393.jpg 620w" sizes="(max-width: 618px) 100vw, 618px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/facebook-api-v2-0-ubuntu-php5-4-fail/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Facebook Magento Store Front Shop Tab Application</title>
		<link>https://blog.gaiterjones.com/facebook-magento-store-front-tab/</link>
					<comments>https://blog.gaiterjones.com/facebook-magento-store-front-tab/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Sun, 28 Oct 2012 09:30:06 +0000</pubDate>
				<category><![CDATA[5 Minute Fix]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Facebook Store Front]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=844</guid>

					<description><![CDATA[I saw an email last week from a company offering a Facebook store front tab application service for Magento that imports your Magento products and creates a basic Magento store...<a class="more-link" href="https://blog.gaiterjones.com/facebook-magento-store-front-tab/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="hang-2-column alignnone" title="Facebook Store Front Magento Tab App" src="http://tommy.ismy.name/wp-content/uploads/2010/12/facebookapps.jpg" alt="" width="173" height="173" />I saw an email last week from a <a href="http://www.storeya.com/" target="_blank">company</a> offering a Facebook store front tab application service for Magento that imports your Magento products and creates a basic Magento store front presence in a Facebook tab application. I thought this was a pretty neat idea especially if you are using Facebook as a marketing tool for your Magento e-commerce site. What I did not find so neat was the price, they want upwards of $1000.00 per year for a fully dynamic storefront with up to date products and support.</p>
<p>Having recently done some work both with Facebook tab apps and exporting Magento product collections in PHP I thought that this is actually a pretty easy task to achieve and coded up an example Facebook Magento Store Front running in a Facebook tab that presents a simple view of your products, product information and a direct link to the product on your Magento web for customers to place orders.</p>
<p>The app talks directly to your Magento database so it will always be up to date. It supports multi language stores and will detect the customers browser language and switch languages accordingly.</p>
<p>This is really a quick win app, integrating quickly with your Magento installation and takes about 30mins to setup and get up and running in Facebook.</p>
<p>Check out my <a href="https://www.facebook.com/pages/gaiterjones/243428839036258?sk=app_366422776778014" target="_blank">demo Facebook storefront / shop tab app here</a>.</p>
<h1>Update</h1>
<p>This app has been replaced by version 2. You can see it working <a href="http://magento1.gaiterjones.com/MagentoFacebookStoreFront/">here</a>.</p>
<h1>DOWNLOAD</h1>
<p>Download the latest version of the application source code <a href="https://blog.gaiterjones.com/dev/extension.php?id=d97b5804dbc9391636a82e5f71ebd597" target="_blank">here</a>.</p>
<p>Basic installation and usage instructions below.</p>
<p>12.11.2012 &#8211; v0.97 &#8211; bug fixes and changes to user configuration setup, user config now held in .ini file.<br />
22.11.2012 &#8211; v1.0.1 &#8211; first public release</p>
<p>&nbsp;</p>
<figure id="attachment_852" aria-describedby="caption-attachment-852" style="width: 440px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53.png"><img decoding="async" class="size-medium wp-image-852" title="Magento Facebook Store Front Tab" src="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-440x338.png" alt="" width="440" height="338" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-440x338.png 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53-620x477.png 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/Screen-Shot-2012-11-06-at-16.12.53.png 829w" sizes="(max-width: 440px) 100vw, 440px" /></a><figcaption id="caption-attachment-852" class="wp-caption-text">Magento Facebook Store Front Tab</figcaption></figure>
<p>&nbsp;</p>
<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics.jpg"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-873" src="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-440x295.jpg" alt="Conversions From the Tab" width="440" height="295" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-440x295.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics-620x416.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/10/facebook-tab-analytics.jpg 800w" sizes="(max-width: 440px) 100vw, 440px" /></a></p>
<p>&nbsp;</p>
<p><strong>Magento Facebook Store Front Tab Application</strong></p>
<p>&nbsp;</p>
<ol>
<li>Introduction</li>
<li>Prerequisites</li>
<li>Installation</li>
<li>Configuration</li>
<li>Usage</li>
<li>Languages</li>
</ol>
<p>&nbsp;</p>
<p><strong>Introduction</strong></p>
<p>&nbsp;</p>
<p>Magento Facebook Store Front Tab is an object oriented PHP script that integrates with a Magento installation to render product HTML designed to be displayed within a Facebook Tab. The application is able to render various product views, all products, new products, categories etc. with a simple product description and link to your actual Magento web store for purchases.</p>
<p>&nbsp;</p>
<p>The application supports normal desktop clients.</p>
<p>&nbsp;</p>
<p><strong>Prerequisites</strong></p>
<p>&nbsp;</p>
<p>This application requires a configured Facebook Account, Facebook Page and a configured Facebook application. A good knowledge of your Magento installation and Operating System is assumed as well as some experience with Facebook applications and PHP.</p>
<p>&nbsp;</p>
<p><strong>Installation</strong></p>
<p>&nbsp;</p>
<p>Extract the source files ideally to a sub folder of your Magento installation. e.g. /home/www/magento/facebook</p>
<p>&nbsp;</p>
<p>A new folder ‘magentotab’ will be created. Feel free to rename this folder if required.</p>
<p>&nbsp;</p>
<p>The application will then be accessible from your browser via the following url</p>
<p>&nbsp;</p>
<p><a href="http://www.YOURSHOP.com/facebook/magentotab">http://www.YOURSHOP.com/facebook/magentotab</a></p>
<p>&nbsp;</p>
<p>Where <a href="http://www.YOURSHOP.com">www.YOURSHOP.com</a> is the url to your Magento shop frontend. If you install the application somewhere other than your Magento installation folder then you will need to browse to the application via your configured web server path.</p>
<p>&nbsp;</p>
<p><strong>Configuration</strong></p>
<p>&nbsp;</p>
<p>Edit the file applicationConfig.php in /magentotab/config.</p>
<p>&nbsp;</p>
<p>Edit</p>
<p>const PATH_TO_MAGENTO_INSTALLATION = &#8216;/home/www/dev/magento/&#8217;;</p>
<p>&nbsp;</p>
<p>With the actual path to your Magento installation.</p>
<p>&nbsp;</p>
<p>Edit fbAppID, fbAppSecret and fbUrl with the App ID, Secret and URL from your configured Facebook app.</p>
<p>&nbsp;</p>
<p>To display a menu on the product page set the showMenu constant to true. Depending on traffic and your hosting etc. the application may run faster when the menu is disabled.</p>
<p>&nbsp;</p>
<p>To exclude categories from being shown in the product menu, configure the excludedProductCategories constant with a list of category id’s separated by a comma, e.g.</p>
<p>&nbsp;</p>
<p>const excludedProductCategories=&#8217;4,5,16,17,18,19,22,23,25,27,28,29,30,31,32,33,34,35,37&#8242;;</p>
<p>For google UTM tagging configure the googleUTMTag constant with a valid Google UTM URI.</p>
<p>&nbsp;</p>
<p>The bannerImage constant holds the name of the graphic file used as the banner at the top of the Facebook Tab page.</p>
<p>&nbsp;</p>
<p>Set the productLimit constant to define the number of products that will appear per page. This should be divisible by 9.</p>
<p>&nbsp;</p>
<p>Set the defaultCollectionType constant. This defines the default product view that will be shown. Options are</p>
<p>&nbsp;</p>
<p>newfromdate &#8211; Products set with the NEW FROM attribute &#8211; i.e. New Products.</p>
<p>allproducts &#8211; All Products</p>
<p>categoryproducts &#8211; Products from a category.</p>
<p>&nbsp;</p>
<p>Determine which product description will be shown for the product</p>
<p>useShortDescription=true &#8211; Use short description</p>
<p>useLongDescription=true &#8211; Use long description</p>
<p>&nbsp;</p>
<p>Configure language options</p>
<p>&nbsp;</p>
<p>const storesConfigured=&#8217;1,2,3&#8242;;</p>
<p>const storesLanguage=&#8217;de,en,fr&#8217;;</p>
<p>const storeDefaultLanguage=&#8217;en&#8217;;</p>
<p>&nbsp;</p>
<p>In this example there are three stores configured with the id’s 1, 2 and 3. The store languages for store 1,2,3 are de, en, fr &#8211; German, English, French. And the default language is ‘en’ &#8211; English.</p>
<p>&nbsp;</p>
<p>The showContact and showAbout constants enable a Contact and About button on the menu when set to true. This is currently in development.</p>
<p>&nbsp;</p>
<p>The allowStandAlone constant lets the application run in a standalone browser when set to true. When set to false the application will redirect to the Facebook URL of the app. Set to true for debugging the app standalone outside of Facebook.</p>
<p>&nbsp;</p>
<p>Set the pageLikeRequired constant to true if visitors must first Like the Facebook page the tab is running in before they can access the application.</p>
<p>&nbsp;</p>
<p>Set the URIToApp value to the URI path of the app on your server.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Save the configuration file.</p>
<p>&nbsp;</p>
<p><strong>Usage</strong></p>
<p>&nbsp;</p>
<p>To run the script for the first time browse to the URL of the script as defined above</p>
<p>&nbsp;</p>
<p>i.e. <a href="http://www.YOURSHOP.com/facebook/magentotab">http://www.YOURSHOP.com/facebook/magentotab</a></p>
<p>&nbsp;</p>
<p>If the Magento configuration path is correct you should see a list of products displayed, with or without menu options as specified in the configuration.</p>
<p>&nbsp;</p>
<p>If the application works correctly standalone then you are ready to integrate it with Facebook.</p>
<p>&nbsp;</p>
<p>To install the application as a Facebook Tab ensure that your Facebook application has been created and configured with the correct canvas URL’s to the application and then goto the following link</p>
<p>&nbsp;</p>
<p><a href="http://www.YOURSHOP.com/facebook/magentotab?fbtab=true">http://www.YOURSHOP.com/facebook/magentotab?fbtab=true</a></p>
<p>&nbsp;</p>
<p>This will return a link that will start the Tab installation process via Facebook. Select the Facebook page to install the Tab on.</p>
<p>&nbsp;</p>
<p>When the Tab is installed goto your Facebook page to confirm that the app is working.</p>
<p>&nbsp;</p>
<p><strong>Languages</strong></p>
<p>&nbsp;</p>
<p>To translate some of the interface text used in the application to your language, simply create a new language file in the php/locale folder named XX.txt where XX is your two letter language code. Use an existing language file as a template and add your translations to the file in the format</p>
<p>&nbsp;</p>
<p>Text=TranslatedText.</p>
<p>&nbsp;</p>
<p>Make sure your language settings are configured correctly in the application. You can force the application to the language you want using the storeid variable in the url</p>
<p>&nbsp;</p>
<p>i.e. <a href="http://www.YOURSHOP/facebook/magentotab/?storeid=2">http://www.YOURSHOP/facebook/magentotab/?storeid=2</a></p>
<p>&nbsp;</p>
<p>Will force the application to the language configured for store id 2.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/facebook-magento-store-front-tab/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Discount Coupon Code for Facebook Likes</title>
		<link>https://blog.gaiterjones.com/magento-discount-coupon-code-facebook-likes/</link>
					<comments>https://blog.gaiterjones.com/magento-discount-coupon-code-facebook-likes/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 22 Jun 2012 10:00:16 +0000</pubDate>
				<category><![CDATA[Coupon]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Likes for Discounts]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=741</guid>

					<description><![CDATA[The Facebook &#8220;Like&#8221; is an important Social Media Marketing tool. It instills customer confidence and enables new marketing opportunities. Increasing the number of likes your e-Commerce site has can sometimes...<a class="more-link" href="https://blog.gaiterjones.com/magento-discount-coupon-code-facebook-likes/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/online-discount-icon.jpg"><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="Grab a Discount and Give me a Like!" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/online-discount-icon.jpg" width="150" height="150" /></a>The Facebook &#8220;<strong>Like</strong>&#8221; is an important Social Media Marketing tool. It instills customer confidence and enables new marketing opportunities. Increasing the number of likes your e-Commerce site has can sometimes be difficult but one way to really boost those likes is to offer a reward in the form of a discount code if customers like your Facebook page.</p>
<p>I wanted to accomplish this with a standalone PHP application embedded into a Facebook page tab. The goals were to step the customer through connecting with the Facebook application, liking the page and generating / managing the discount codes and Magento coupons.</p>
<p>We want to take full advantage of the marketing information we can glean from Facebook so another requirement was so store the customers Facebook profile information in a database along with the generated discount code.</p>
<p>We can also generate a wall post on the customers Facebook wall to ensure our offer is shared with their Facebook friends.</p>
<p>The <a href="https://www.facebook.com/pages/gaiterjones/243428839036258?sk=app_375000545898475" target="_blank">application</a> uses the Facebook API to communicate with Facebook and loads Magento externally to generate the Magento coupon sales rules dynamically.</p>
<p>Here are the main features of the application:</p>
<p>1. Connect the customer to the Facebook application and save the customers Facebook profile information  to a MySQL database.</p>
<p>2. Get the customer to click the Like button for this Facebook page</p>
<figure id="attachment_742" aria-describedby="caption-attachment-742" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes1.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-742" title="Magento Facebook Like Discount Application" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes1-620x251.jpg" width="620" height="251" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes1-620x251.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes1-440x178.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes1.jpg 837w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-742" class="wp-caption-text">Customer has connected with the application in Facebook and must click the Like button to continue.</figcaption></figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>3. Generate discount code and Magento coupon.</p>
<figure id="attachment_743" aria-describedby="caption-attachment-743" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes2.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-743" title="Magento Facebook Like Discount Application" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes2-620x254.jpg" width="620" height="254" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes2-620x254.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes2-440x180.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes2.jpg 847w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-743" class="wp-caption-text">Customer has liked the page , the discount code and Magento coupon are dynamically generated and displayed to the customer.</figcaption></figure>
<p>&nbsp;</p>
<p>and post to the customers Facebook wall (optional).</p>
<figure id="attachment_752" aria-describedby="caption-attachment-752" style="width: 497px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes5.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-752" title="Magento Discounts for Facebook Likes" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes5.jpg" width="497" height="247" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes5.jpg 497w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes5-440x218.jpg 440w" sizes="(max-width: 497px) 100vw, 497px" /></a><figcaption id="caption-attachment-752" class="wp-caption-text">Share the love, an automatic wall post is created when a discount code is issued.</figcaption></figure>
<p>&nbsp;</p>
<p>4. Manage subsequent attempts to generate codes by the same Facebook user. Of course customers can create multiple Facebook accounts to obtain codes so your discount amount has to be thought out properly and relevant <strong>terms and conditions</strong> applied to try and prevent abuse. How much are Facebook likes worth to you?  A good idea would be to make the discounts valid for a certain spend amount, $15 discount when you spend over $100 for example. Remember if you already have 1,000 likes on your Facebook page, you are potentially giving away 1,000 discount codes to existing customers as this application does not distinguish between new and old likes!</p>
<figure id="attachment_746" aria-describedby="caption-attachment-746" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes32.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-746" title="Magento Facebook Like Discount Application" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes32-620x292.jpg" width="620" height="292" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes32-620x292.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes32-440x207.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes32.jpg 825w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-746" class="wp-caption-text">A discount code has already been generated for this Facebook account.</figcaption></figure>
<p>&nbsp;</p>
<p>The customer can now copy and paste the code directly into the Magento frontend store coupon box.</p>
<figure id="attachment_747" aria-describedby="caption-attachment-747" style="width: 609px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes4.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-747 " title="Magento Facebook Like Discount Application" alt="" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes4.jpg" width="609" height="141" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes4.jpg 609w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/magentoDicountsforLikes4-440x101.jpg 440w" sizes="(max-width: 609px) 100vw, 609px" /></a><figcaption id="caption-attachment-747" class="wp-caption-text">Generated discount code is entered at checkout and discount is shown in cart.</figcaption></figure>
<p>&nbsp;</p>
<p>Test the application <a href="https://www.facebook.com/pages/gaiterjones/243428839036258?sk=app_375000545898475" target="_blank">here</a>.</p>
<p>Download the application source code <a title="GitHub" href="https://github.com/gaiterjones/magento-facebook-discount-for-likes" target="_blank">here</a> check out the readme file for installation instructions. The main installation requirements are</p>
<p>PHP5.x/MYSQL<br />
Public webspace on the same server as your Magento installation<br />
A valid configured Facebook Tab application.<br />
Magento 1.3+</p>
<p>Edit the config.php file with your configuration settings and create the database and database table using the SQL in the readme file.</p>
<p>This could be developed as a Magento module too, the advantages I can see for a module would be to allow the whole process to run within your Magento shop instead of a Facebook page tab.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-discount-coupon-code-facebook-likes/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
			</item>
		<item>
		<title>Facebook fan page video and audio media sharing application demo</title>
		<link>https://blog.gaiterjones.com/facebook-video-audio-media-sharing-application-demo/</link>
					<comments>https://blog.gaiterjones.com/facebook-video-audio-media-sharing-application-demo/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 20 Jun 2012 15:38:10 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Like Button]]></category>
		<category><![CDATA[Streaming]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=733</guid>

					<description><![CDATA[I wanted to integrate my favourite jQuery based media player into a Facebook application as a way to share audio and video media to promote a Facebook fan page. The...<a class="more-link" href="https://blog.gaiterjones.com/facebook-video-audio-media-sharing-application-demo/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/headphones_icon.jpg"><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="headphones_icon" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/headphones_icon-440x340.jpg" alt="" width="185" height="143" /></a>I wanted to integrate my favourite jQuery based media player into a Facebook application as a way to share audio and video media to promote a Facebook fan page.</p>
<p>The deal was to offer audio or video media in return for Liking a Facebook page (although this is optional). I also wanted a rating system for the media which could be used later together with the Social information harvested from users as a marketing opportunity.</p>
<p>A working demonstration is available <a href="https://www.facebook.com/pages/gaiterjones/243428839036258?sk=app_438703899484355" target="_blank">here</a> your comments are very welcome. You will need to connect with the app and like the Facebook page before the media will stream.</p>
<p>The app is written in PHP with a MySQL database, using a few jQuery plugins including jPlayer for the media player and jRating integrated with jPlayer and the database for the rating system.</p>
<p>Media and user information are stored in the database.</p>
<figure id="attachment_734" aria-describedby="caption-attachment-734" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2012/06/Image1.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-734" title="Facebook audio video media streaming application demo" src="https://blog.gaiterjones.com/wp-content/uploads/2012/06/Image1-620x570.jpg" alt="Facebook audio video media streaming application demo" width="620" height="570" srcset="https://blog.gaiterjones.com/wp-content/uploads/2012/06/Image1-620x570.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/Image1-440x404.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2012/06/Image1.jpg 649w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-734" class="wp-caption-text">Facebook audio video media streaming application demo</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/facebook-video-audio-media-sharing-application-demo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Automated Social Media Marketing FREE Extension &#8211; Twitter, Facebook</title>
		<link>https://blog.gaiterjones.com/magento-automated-social-media-marketing/</link>
					<comments>https://blog.gaiterjones.com/magento-automated-social-media-marketing/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 11:33:16 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Free Magento Extensions]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[marketing tweets]]></category>
		<category><![CDATA[Social Media Marketing]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[free magento extension]]></category>
		<category><![CDATA[Magento]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=548</guid>

					<description><![CDATA[This Magento module provides an automated social media marketing solution by generating Magento product marketing social media posts to Twitter and Facebook when a customer places an order. How it...<a class="more-link" href="https://blog.gaiterjones.com/magento-automated-social-media-marketing/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="hang-2-column     alignnone" title="Magento Automated Social Media Marketing FREE Extension" src="https://blog.gaiterjones.com/wp-content/uploads/2011/03/buyxgeyfree-box.jpg" alt="Magento Automated Social Media Marketing FREE Extension" width="168" height="168" /><br />
This Magento module provides an automated social media marketing solution by generating Magento product marketing social media posts to Twitter and Facebook when a customer places an order.</p>
<h1><strong>How it Works</strong></h1>
<p>The code in the module is called at checkout and a random product is selected from products in  the customers cart. The information from this random &#8220;Top Seller&#8221; product is used to create a product marketing post, including a headline, short description and short Bit.ly URL to link to the product page. The built in Magento scheduling system is then used to regularly check for new marketing posts and send them to Twitter and Facebook.</p>
<figure id="attachment_17" aria-describedby="caption-attachment-17" style="width: 528px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-17" title="Example automated product marketing tweet" src="https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12.jpg" alt="Example automated product marketing tweet" width="528" height="102" srcset="https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12.jpg 528w, https://blog.gaiterjones.com/wp-content/uploads/2010/12/Image12-300x57.jpg 300w" sizes="(max-width: 528px) 100vw, 528px" /><figcaption id="caption-attachment-17" class="wp-caption-text">Example automated product marketing tweet</figcaption></figure>
<p>&nbsp;</p>
<p>To use this module you must enable the Magento scheduling system and will need a Twitter  account, and configured Twitter application, a Facebook account and configured Facebook application and a Bit.ly account, further information for setting these accounts up is detailed below.</p>
<figure id="attachment_565" aria-describedby="caption-attachment-565" style="width: 425px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-565" title="Magento Automated Social Media Marketing Facebook Example" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-6.jpg" alt="Magento Automated Social Media Marketing Facebook Example" width="425" height="136" /><figcaption id="caption-attachment-565" class="wp-caption-text">Example automated Facebook post</figcaption></figure>
<p>&nbsp;</p>
<p>Tested with Magento CE 1.6.1</p>
<p>I am looking for <strong>extension testers</strong>, <a href="https://blog.gaiterjones.com/dev/extension.php?id=2f7ab7ec9e088352b822073749d6e7d0" target="_blank">download BETA version 0.26 (last updated 09-12-2011) of the extension <strong>here</strong></a></p>
<p><strong>Updates</strong></p>
<p>If you use this extension be sure to update to the latest version.</p>
<p>*  0.22 &#8211; First beta release. 15.09.2011<br />
*  0.23 &#8211; Developed Facebook integration and duplicate post control logic. 16.09.2011<br />
* 0.24 &#8211; Improved Facebook posting, added logic to exclude posts for products in specified categories. 19.09.2011<br />
* 0.25 &#8211; Added time range to stop being too <em>spammy</em> by restricting posts to specific hours of the day. 04.11.2011<br />
* 0.26 &#8211; Fixed grouped products not being posted due to hidden child simple products of the parent group product.</p>
<p><strong>Wishlist</strong></p>
<p>Implement logic to control the duplication of product Tweets. Done &#8211; v0.23<br />
Extend to other Social Media platforms, Facebook, etc. Facebook Support in v0.23<br />
Implement hash tags for Twitter.<br />
Add to Cart link in Facebook posts<br />
Add option to use Short or Long description text.</p>
<h1><strong>Installation</strong></h1>
<p>Prerequisites :</p>
<p>Enable Magento scheduling system<br />
Twitter Account<br />
Twitter Application<br />
Facebook Account<br />
Authorised Facebook Application</p>
<p>Bit.ly Account (optional)</p>
<p>To install this extension:</p>
<p><strong>1.</strong> Unzip the module and copy the contents of the modules app folder to the app folder of your Magento store installation.</p>
<p><strong>2</strong>. Ensure that the module /cache and /cache/Bitly folders have write permissions set to allow the WWW user group write access. The module stores the product Tweets and caches the Bit.ly short URLs in this folder.</p>
<p><strong>3</strong>. Refresh the Magento Store cache</p>
<p><strong>4.</strong> Logout and login back into the admin backend, goto System &#8211; Configuration and locate the configuration settings under My Extensions &#8211; Social Media Marketing.</p>
<h1><strong>Configuration</strong></h1>
<p>1. Configure the Twitter, Facebook and Bit.ly account, authorisation and API keys. See below for further information. If you do not want to use the Bit.ly short URL service set the enable option to no.</p>
<p>Twitter is enabled by default, Facebook is disabled by default.</p>
<p>2. Define a headline prefix for the product marketing text, the default if left blank is &#8220;Top Seller:&#8221; To disable this prefix enter NONE. For Facebook you can define the text to use for the post header. Define the &#8220;uniqueness&#8221; value for posts, this value will be used to check for if a product has already been posted in the last X posts, where X is the value you define here. This will help prevent duplicate posts. You can also configure a time range so that Social Media Marketing posts will only be made during the times selected.</p>
<p>3. Configure Google UTM tags for traffic tracking in Google analytics.e.g. ?utm_source=SocialMediaMarketing&amp;utm_medium=Top-Seller&amp;utm_campaign=MyCampaig</p>
<figure id="attachment_608" aria-describedby="caption-attachment-608" style="width: 620px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-608" title="Google Analytics Magento Social Media Marketing Revenue Report" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-620x95.jpg" alt="" width="620" height="95" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-620x95.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento-440x67.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/SocialMediaMarketingUTMTagsMagento.jpg 1423w" sizes="(max-width: 620px) 100vw, 620px" /></a><figcaption id="caption-attachment-608" class="wp-caption-text">Example Google Analytics Magento Social Media Marketing Revenue Report</figcaption></figure>
<p>&nbsp;</p>
<p>4. Enable email alerts which will help you debug the module during testing.</p>
<p>5. Save the extension configuration settings and test.</p>
<h1><strong>Testing</strong></h1>
<p>Make a test order in your store to test the extension. Upon checkout completion the product marketing information will be written to the modules cache folder. At the next scheduled Magento task execution the text will be posted to Twitter (and Facebook if enabled) and the cached file deleted.</p>
<p>To force the Magento scheduler to run navigate to <strong>http://www.yourwebshop.com/cron.php</strong>. Check your Twitter and Facebook pages to confirm the marketing post has been submitted. Any errors that occur during this process will be emailed to the default store email address if you set email alerts enabled to <em>YES</em> in the configuration.</p>
<figure id="attachment_556" aria-describedby="caption-attachment-556" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-556" title="Magento Social Media Marketing - example product tweet" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4-440x70.jpg" alt="Magento Social Media Marketing - example product tweet" width="440" height="70" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4-440x70.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-4.jpg 533w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-556" class="wp-caption-text">example product tweet</figcaption></figure>
<h1></h1>
<h1><strong><strong><strong><strong>ENABLE MAGENTO SCHEDULING</strong></strong></strong></strong></h1>
<p>Magento uses a single file named <strong>cron.php</strong> to execute all its scheduled tasks –  cron.php should be executed regularly to allow configured background tasks in Magento to run and is also used by this module to check for marketing information to post. For example to run cron.php every 5 minutes add the following or similar to your crontab (crontab -e):</p>
<p><em>*/5 * * * * /usr/bin/php -f  /PATH-TO-MAGENTO/cron.php</em></p>
<p>Alternatively for testing you can execute cron.php from your browser by browsing to</p>
<p><em>http://www.yourstore.com/cron.php</em></p>
<p>&nbsp;</p>
<h1><strong><strong>TWITTER Configuration<br />
</strong></strong></h1>
<p>Folow the steps below to create a Twitter application that will be used by the module to access your Twitter account and post product marketing Tweets.</p>
<p>1. If you do not already have a Twitter account, create an account at <a href="http://www.tiwtter.com">http://www.tiwtter.com</a></p>
<p>2. Go to <a href="https://dev.twitter.com/">https://dev.twitter.com/</a> and login with your Twitter credentials.</p>
<p>3. Click the Create an App link.</p>
<p>4. Complete the first page of the application form with your application name, description and website address. A Callback URL is not required. Click the &#8220;Create your twitter app&#8221; button to continue.</p>
<figure id="attachment_552" aria-describedby="caption-attachment-552" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-552" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-440x271.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="271" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-440x271.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1-620x382.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-1.jpg 981w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-552" class="wp-caption-text">configure a twitter application</figcaption></figure>
<p>&nbsp;</p>
<p>5. Goto the application settings tab and ensure your application is set to <strong>Read and Write</strong> and click Update Setting to continue.</p>
<figure id="attachment_553" aria-describedby="caption-attachment-553" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-553" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-440x151.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="151" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-440x151.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2-620x213.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-2.jpg 637w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-553" class="wp-caption-text">ensure the application has read write access</figcaption></figure>
<p>&nbsp;</p>
<p>6. Click on the details tab and scroll down to the Create my access Token button, click it to create access tokens for the application. You will see the four main authentication tokens listed CONSUMER KEY, CONSUMER SECRET, ACCESS TOKEN and ACCESS TOKEN SECRET. Ensure that the access tokens have READ and WRITE access.</p>
<p>7. Copy each authentication token into the configuration settings of the module and click save.</p>
<p>If you do not want to use Bit.ly to shorten URLs in the marketing tweets you have the option of enabling t.co shortlinks in the application settings and you can disable Bit.ly in the extension settings.</p>
<p>You can confirm your application is enabled and has access to your Twitter account by going to account settings -&gt; applications in Twitter.</p>
<figure id="attachment_554" aria-describedby="caption-attachment-554" style="width: 440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-medium wp-image-554" title="Magento Social Media Marketing - configure a twitter application" src="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-440x95.jpg" alt="Magento Social Media Marketing - configure a twitter application" width="440" height="95" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-440x95.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3-620x134.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2011/09/social-media-marketing-twitter-3.jpg 633w" sizes="(max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-554" class="wp-caption-text">confirm application is enabled</figcaption></figure>
<h1></h1>
<h1>FACEBOOK CONFIGURATION</h1>
<p>Login to Facebook and then browse to</p>
<p><a href="http://developers.facebook.com/">http://developers.facebook.com/</a></p>
<p>Create an application that will be used to post marketing information to your Facebook page, this can be a normal profile page or a Business/Fan page. When complete note the application ID and application secret.</p>
<p>The application must be authorised for your Facebook page to work.</p>
<p>To authorise the application for your page edit the following URL and paste to your browser, replaceing YOURAPIKEY and YOURPAGEID..</p>
<p>facebook.com/connect/prompt_permissions.php?api_key=YOURAPIKEY&amp;v=1.0&amp;next=http://www.facebook.com/connect/login_success.html?xxRESULTTOKENxx&amp;display=popup&amp;ext_perm=publish_stream&amp;enable_profile_selector=1&amp;profile_selector_ids=YOURPAGEID</p>
<h1></h1>
<h1>BIT.LY CONFIGURATION</h1>
<p>To create a Bit.ly account goto <a href="http://bit.ly">http://bit.ly</a> and register an account. Once registered obtain your API key by clicking on Account -&gt; Settings. Configure your bit.ly username and API key in the configuration settings of the extension and save them.Bit.ly is enabled by default in the extension, If you do not want to use bit.ly you can disable it in the configuration settings.</p>
<p>&nbsp;</p>
<p><strong><strong><br />
</strong></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-automated-social-media-marketing/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>The Marketing Power of Facebook &#038; Lady Gaga</title>
		<link>https://blog.gaiterjones.com/the-marketing-power-of-facebook-and-lady-gaga/</link>
					<comments>https://blog.gaiterjones.com/the-marketing-power-of-facebook-and-lady-gaga/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Tue, 05 Jul 2011 08:57:54 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Lady Gaga]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Social Media Marketing]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=473</guid>

					<description><![CDATA[The marketing power of Facebook is very interesting, take the Lady they call Gaga, she is the most popular female music artist on Facebook having accumulated so far almost 40...<a class="more-link" href="https://blog.gaiterjones.com/the-marketing-power-of-facebook-and-lady-gaga/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="hang-2-column    alignnone" title="The eCommerce Power of Lady Gaga on Facebook" src="https://blog.gaiterjones.com/wp-content/uploads/2011/07/lady-gaga-facebook.jpg" alt="The eCommerce Power of Lady Gaga on Facebook" width="282" height="148" />The marketing power of Facebook is very interesting, take the Lady they call Gaga, she is the most popular female music artist on Facebook having accumulated so far almost 40 million Facebook likes, almost 1.5 million people indicate their interest in her and her products (music) each week, and as you are reading this that number is raipdly rising.</p>
<p>Within 24 hours an update on her Facebook page will receive over 50,000 likes. This is the equivalent of handing out an advertising flyer to everyone in a packed out Wembley Stadium, each one reading it and indicating that they like what they have read, and it costs <em>absolutely nothing</em>.</p>
<p>These Facebook Like figures for a post are indicative of perhaps half a million to a million page views. In Marketing terms if Lady Gaga posts a link from her Facebook page to her own site advertising new music, products etc. the traffic generated would be astonishing and exceed anything you could pay Google for within the same time frame.</p>
<figure id="attachment_475" aria-describedby="caption-attachment-475" style="width: 359px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/07/facebook-page-leaderboard1.jpg"><img loading="lazy" decoding="async" class="nohang         " title="Facebook page leaderboard 05.07.2011" src="https://blog.gaiterjones.com/wp-content/uploads/2011/07/facebook-page-leaderboard1.jpg" alt="Facebook page leaderboard 05.07.2011" width="359" height="193" /></a><figcaption id="caption-attachment-475" class="wp-caption-text">Facebook page leaderboard 05.07.2011</figcaption></figure>
<p>&nbsp;</p>
<p>Combine this with a Twitter update, she has 11 million Twitter followers, and the eCommerce power of social media networks in terms of marketing and potential exposure of new products is awesome.</p>
<p>Via Facebook and Twitter Lady Gaga has the power to instantly reach literally hundreds of thousands of customers (fans) within seconds creating the possibility to generate a <em>lot</em> of product awareness, exposure and most importantly revenue.</p>
<p>I would not like to estimate how much advertising power like this would cost to purchase. Celebrities like Lady Gaga, Eminem and Rhianna have created, quite unintentionally, the most powerful advertising vehicle on the Internet. Of course Facebook rides along on this success with its own advertising streams which also gives you an idea of how lucrative Facebook advertising can be.</p>
<p>Perhaps Lady Gaga, Rhianna and Eminem should sell update space on their Facebook sites? Now if you could promote your own products directly on Lady Gagas Facebook page, that would be pretty neat. I won&#8217;t buy her CD but I would pay for that!</p>
<p>&nbsp;</p>
<figure style="width: 640px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="hang-2-column          " title="Advertise to 90,000 people in seconds" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Wembley_Stadium%2C_London.jpg/800px-Wembley_Stadium%2C_London.jpg" alt="" width="640" height="213" /><figcaption class="wp-caption-text">Advertise to 90,000 people in seconds</figcaption></figure>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/the-marketing-power-of-facebook-and-lady-gaga/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Product Social Media Marketing Part 1 &#8211; the Facebook Like Button</title>
		<link>https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/</link>
					<comments>https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 13:44:55 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[IFrame]]></category>
		<category><![CDATA[Like Button]]></category>
		<category><![CDATA[Open Graph]]></category>
		<category><![CDATA[Social Media Marketing]]></category>
		<category><![CDATA[XFBML]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=121</guid>

					<description><![CDATA[What is Social Media Marketing? According to Wikipedia its &#8220;a means to gain customer and competitive insight, recruitment and retention of new customers/business partners, and a method of managing their...<a class="more-link" href="https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>What is Social Media Marketing? According to <a href="http://en.wikipedia.org/wiki/Social_media_marketing" target="_blank">Wikipedia </a>its &#8220;<em>a means to gain customer and competitive insight, recruitment and retention of new customers/business partners, and a method of managing their reputation online</em>.&#8221; It is a powerful way to create social exposure for your products and boost traffic to your site.</p>
<p><a href="http://www.twitter.com" target="_blank">Twitter</a>, <a href="http://www.facebook.com" target="_blank">Facebook </a>and <a href="http://www.youtube.com">Youtube </a>are the most popular social networking destinations, I&#8217;ve already looked at how to automatically generate <a href="https://blog.gaiterjones.com/automatic-magento-product-marketing-tweets-for-twitter/" target="_blank">product marketing Tweets for Twitter</a>, so let&#8217;s now turn our attention to Facebook and look at ways to integrate  product information from a Magento eCommerce store into the Facebook Social Graph by implementing the Facebook Like Button on all Magento product, category or cms pages.</p>
<p><img loading="lazy" decoding="async" class="alignleft size-full wp-image-206" style="margin: 5px;" title="Facebook Like Button" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/facebook_like_button.jpg.336x0.jpg" alt="" width="111" height="76" srcset="https://blog.gaiterjones.com/wp-content/uploads/2011/02/facebook_like_button.jpg.336x0.jpg 336w, https://blog.gaiterjones.com/wp-content/uploads/2011/02/facebook_like_button.jpg.336x0-300x203.jpg 300w" sizes="(max-width: 111px) 100vw, 111px" />You will have seen the Facebook Like Button everywhere, but what exactly is it? <a href="http://developers.facebook.com/docs/reference/plugins/like/">Facebook </a>calls the Like Button a <em>Social Plugin</em> that &#8220;&#8230;lets a user share your content with friends on Facebook. When the user clicks the Like button on your site, a story appears in the user&#8217;s friends&#8217; News Feed with a link back to your website.&#8221;  The Like Button is both simple and powerful. The concept is simple, Facebook users click the Like button to &#8220;like&#8221; something and indicate its cool to their friends. Their friends see the link they have liked in their Facebook news feed and are therfore also encouraged to click it. When the Like Button is integrated into your eCommerce store, the Facebook user (customer) indicates their confidence, satisfaction etc in your products by clicking the Like Button creating a great marketing opportunity for you by sharing your products with all of their friends. But there is more to it than that, because clicking the like button also integrates your product page into the Facebook &#8220;Open Graph&#8221; database.  Facebook says &#8220;If you include Open Graph tags on your Web page, your page becomes <em>equivalent to a Facebook page</em>. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the &#8220;Likes and Interests&#8221; section of the user&#8217;s profile, and you have the ability to <em>publish updates </em>to the user. Your page will show up in same places that Facebook pages show up around the site (e.g. search), and you can target ads to people who like your content.&#8221; Facebook is attempting to assimilate the Internet into its own Database ultimately turning all Internet pages into Facebook Open Graph objects. With a user base of around 400 million, whether you are a Facebook fan or not this marketing opportunity should not be neglected!</p>
<p>On Sunday 27th February 2011 Facebook altered the functionality of the Like button to replace the functionality of the Share button. The &#8220;Share&#8221; button will see no further development according to Facebook Spokeswoman Malorie Lucich. The company will continue to support the Share button but Like is the “recommended solution moving forward.” The main difference users will now see is that likes to external content are shown in profiles and news streams as &#8220;user likes a link TO EXTERNAL CONTENT&#8221; instead of &#8220;user likes EXTERNAL CONTENT&#8221;. The latter still applying for content hosted on Facebook.</p>
<p>Implementing the Like Button with Magento is relatively simple and there are <a href="http://www.magentocommerce.com/magento-connect/filter/all?query=facebook" target="_blank">extensions </a>available from Magento Connect (even a free one!) the most important aspect of implementing the Like Button is getting the Open Graph data right to ensure that your products are &#8220;assimilated&#8221; correctly into Facebook with a unique and constant URL,  product title, image and meaningful SEO rich description. Check out the extensions with that in mind, if you want to implement the Like Button yourself within Magento 1.3, 1.4 or 1.5 here&#8217;s how I did it. I strongly <em>recommend </em>you develop your Facebook Like button on a development server and not your live site!</p>
<h2>Go Canonical</h2>
<p>The Like Button requires a unique URL to identify your product page in the Facebook Open Graph database.  Magento is notorious for creating duplicate content, generating mulitple URLs for the same product content so it is also good SEO practice to implement the <a href="http://yoast.com/canonical-url-links/" target="_blank">canonical URL</a> tag within the header of your site to tell search engines which URL they <em>should</em> use for your products to avoid duplicating search engine content. The canonical URL is perfect for the Facebook Open Graph URL tag. In Magento 1.4.x and above Canonical URLs are included in the core code, for Magento 1.3.x use the <a href="http://yoast.com/" target="_self">Yoast </a>canonical URL extension its free and installs quickly and easily. Here&#8217;s how to install the extension under 1.3.</p>
<p><strong>Magento Community Edition 1.3.x</strong></p>
<p>You can find the Yoast canonical URL extension on <a href="http://www.magentocommerce.com/magento-connect/Yoast/extension/906/canonical-url-s-for-magento">Magento Connect</a> <span style="text-decoration: underline;">note</span> there are <a href="http://yoast.com/tools/magento/canonical/" target="_blank">issues </a>with this extension if you already use the Fooman Speedster module that you need to workaround.</p>
<p>I installed it under Magento 1.3.x using the command line <em>PEAR </em>installer :</p>
<pre class="brush:plain">dev/magento1-3-3-dev# ./pear mage-setup
Running initial setup...
config-set succeeded
Channel "connect.magentocommerce.com/core" is already initialized
Channel "connect.magentocommerce.com/community" is already initialized

dev/magento1-3-3-dev# ./pear install magento-community/canonical_url-1.3
downloading canonical_url-1.3.tgz ...
Starting to download canonical_url-1.3.tgz (3,866 bytes)
....done: 3,866 bytes
install ok: channel://connect.magentocommerce.com/community/canonical_url-1.3</pre>
<p>Refresh the Magento cache to enable the extension.</p>
<p><strong>Magento Community Edition 1.4.x, 1.5.x</strong></p>
<p>Magento 1.4 and 1.5 now support the canonical tag &#8220;out of the box&#8221;. To enable the tag for the category and product pages go to: <em>System=&gt;Configuration=&gt;Catalog=&gt;Search Engine Optimization</em> and enable: <em> </em><em>Use Canonical Link Meta Tag For Products</em> (and if you want &#8211; <em>Use Canonical Link Meta Tag For Categories</em>) : <em> </em></p>
<figure id="attachment_136" aria-describedby="caption-attachment-136" style="width: 518px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image4.jpg"><img loading="lazy" decoding="async" class="hang-1-column      " style="border: 1px solid #dddddd;" title="Enable canonical Meta Tag in Magento 1.4, 1.5" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image4.jpg" alt="Enable canonical Meta Tag in Magento 1.4, 1.5" width="518" height="136" /></a><figcaption id="caption-attachment-136" class="wp-caption-text">Enable canonical Meta Tag in Magento 1.4, 1.5</figcaption></figure>
<p><strong>Confirm the Canonical Tag is correct<br />
</strong></p>
<p>Check the Canonical Tag is working by browsing to a product and checking the source HTML. In my demo store with Magento 1.3.x or with the Canonical Tag option deactivated in Magento 1.4, 1.5 the Nokia 2610 product page shows the category/product url <strong><em>http://dev.webshop.com/electronics/cell-phones/nokia-2610-phone.html</em></strong>, with the Yoast extension or canonical Meta Tags activated there is a more SEO friendly canonical link URL :</p>
<p>&lt;link rel=&#8221;canonical&#8221; href=&#8221;<strong><em>http://dev.webshop.com/nokia-2610-phone.html</em></strong>&#8221; /&gt;</p>
<h2>Configure the Open Graph Meta tags</h2>
<p>Now we have a static canonical URL for our products we need to configure the Open Graph meta tags Facebook will use to convert our page into a Facebook Open Graph object. Facebook says &#8220;The (Open Graph Meta) tags allow you to specify structured information about your web pages. The more information you provide, the more opportunities your web pages can be surfaced within Facebook today and in the future.&#8221;</p>
<p>Before we can add the meta tags we need to add the <em>xmlns:fb -attribute</em> to the xml name space element in our HTML header, this is so that Internet Explorer browsers can understand the Open Graph tags.</p>
<p>Locate the main <em>/template/page</em> folder for your Magento theme, for the default theme this is located in <em>app/design/frontend/base/default/template/page</em> for Magento 1.4.x, 1.5.x and <em>app/design/frontend/default/default/template/page</em> for Magento 1.3.x.</p>
<p>Open the main HTML <em>template phtml</em> file for your theme e.g. 2columns-right.phtml and locate the line of code with the opening HTML element:</p>
<pre class="brush:plain">&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="&lt;?php echo $this-&gt;getLang() ?&gt;" lang="&lt;?php echo $this-&gt;getLang() ?&gt;"&gt;</pre>
<p>Change this to</p>
<pre class="brush:plain">&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraph.org/schema/" xml:lang="&lt;?php echo $this-&gt;getLang() ?&gt;" lang="&lt;?php echo $this-&gt;getLang() ?&gt;"&gt;</pre>
<p>Now in the <em>template/page/html</em> folder open the <em>head.phtml</em> file and add the following code and Open Graph meta tags for your version of Magento directly under the existing META tags.  (Double click the code boxes and and use CTRL-C to copy the code.)</p>
<p><strong>Magento Community Edition 1.3.x with Canonical URL Extension</strong></p>
<pre class="brush:php">&lt;?php
/**
 * Facebook Open Graph meta tags Magento 1.3
 *
 */
?&gt;
&lt;!--Default OG Meta tags--&gt;
&lt;meta property="og:site_name" content="My eCommerce Store"/&gt;
&lt;meta property="og:street-address" content="1 THE High Street"/&gt;
&lt;meta property="og:locality" content="London"/&gt;
&lt;meta property="og:postal-code:" content="SW1"/&gt;
&lt;meta property="og:country-name:" content="United Kingdom"/&gt;
&lt;meta property="og:phone_number" content="00441234567890"/&gt;
&lt;meta property="og:latitude" content="00.00000000000000"/&gt;
&lt;meta property="og:longitude" content="00.00000000000000"/&gt;
&lt;?php // ***** Detect product or category page ?&gt;
&lt;?php if (Mage::registry('current_category')): ?&gt;
&lt;?php $cat=Mage::registry('current_category') ?&gt;
&lt;?php $catLevel=$cat-&gt;getLevel() ?&gt;
&lt;?php $catId=$cat-&gt;getId()  ?&gt;
&lt;?php $_id= Mage::app()-&gt;getRequest()-&gt;getParam('id', false)  ?&gt;
&lt;?php if($_id!=$catId):  ?&gt;
&lt;?php // Product page ?&gt;
&lt;!--Product page OG Meta tags--&gt;
&lt;meta property="og:title" content="&lt;?php echo trim(Mage::registry('current_product')-&gt;getName())?&gt;"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;?php if ($this-&gt;getHeadProductUrl()): ?&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;_data['urlKey'] ?&gt;"/&gt;
&lt;?php endif; ?&gt;
&lt;meta property="og:description" content="&lt;?php echo strip_tags(str_replace("&lt;br /&gt;",", ",substr(Mage::registry('current_product')-&gt;getDescription(), 0, strpos(Mage::registry('current_product')-&gt;getDescription(), '.')+1))) ?&gt;"/&gt;
&lt;meta property="og:image" content="&lt;?php echo Mage::helper('catalog/image')-&gt;init(Mage::registry('current_product'), 'small_image')-&gt;resize(100,100);?&gt;"/&gt;
&lt;?php else: ?&gt;
&lt;?php // Category page ?&gt;
&lt;!--Category page OG Meta tags--&gt;
&lt;meta property="og:title" content="&lt;?php echo trim(Mage::registry('current_category')-&gt;getName())?&gt;"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;helper('core/url')-&gt;getCurrentUrl() ?&gt;"/&gt;
&lt;meta property="og:description" content="&lt;?php echo htmlspecialchars($this-&gt;getDescription()) ?&gt;"/&gt;
&lt;?php if(trim(Mage::registry('current_category')-&gt;getImageUrl()=="")): ?&gt;
&lt;meta property="og:image" content="CATEGORY HAS NO IMAGE CONFIGURE MANUAL LINK TO A GENERIC CATEGORY IMAGE"/&gt;
&lt;?php else: ?&gt;
&lt;meta property="og:image" content="&lt;?php echo trim(Mage::registry('current_category')-&gt;getImageUrl())?&gt;"/&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php // ***** Detect CMS page ?&gt;
&lt;?php if(Mage::getSingleton('cms/page')-&gt;getIdentifier() == 'home'  &amp;&amp; Mage::app()-&gt;getFrontController()-&gt;getRequest()-&gt;getRouteName() == 'cms' ) : ?&gt;
&lt;!--Home page OG Meta tags--&gt;
&lt;meta property="og:title" content="THIS IS THE MAIN CMS HOME PAGE"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;helper('core/url')-&gt;getCurrentUrl() ?&gt;"/&gt;
&lt;meta property="og:description" content="MY DESCRIPTION"/&gt;
&lt;meta property="og:image" content="MANUAL LINK TO A GENERIC IMAGE"/&gt;
&lt;?php endif; ?&gt;</pre>
<p>&nbsp;</p>
<p><strong>Magento Community Edition 1.4.x, 1.5.x</strong></p>
<pre class="brush:php">&lt;?php
/**
 * Facebook Open Graph meta tags Magento 1.4, 1.5
 * updated 16.05.2011
 */
?&gt;
&lt;!--Default OG Meta tags--&gt;
&lt;meta property="og:site_name" content="My eCommerce Store"/&gt;
&lt;meta property="og:street-address" content="1 THE High Street"/&gt;
&lt;meta property="og:locality" content="London"/&gt;
&lt;meta property="og:postal-code:" content="SW1"/&gt;
&lt;meta property="og:country-name:" content="United Kingdom"/&gt;
&lt;meta property="og:phone_number" content="00441234567890"/&gt;
&lt;meta property="og:latitude" content="00.00000000000000"/&gt;
&lt;meta property="og:longitude" content="00.00000000000000"/&gt;
&lt;?php // ***** Detect product or category page ?&gt;
&lt;?php if (Mage::registry('current_category')): ?&gt;
&lt;?php $cat=Mage::registry('current_category') ?&gt;
&lt;?php $catLevel=$cat-&gt;getLevel() ?&gt;
&lt;?php $catId=$cat-&gt;getId()  ?&gt;
&lt;?php $_id= Mage::app()-&gt;getRequest()-&gt;getParam('id', false)  ?&gt;
&lt;?php if($_id!=$catId):  ?&gt;
&lt;?php // Product page ?&gt;
&lt;!--Product page OG Meta tags--&gt;
&lt;meta property="og:title" content="&lt;?php echo trim(Mage::registry('current_product')-&gt;getName())?&gt;"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;?php if ($this-&gt;helper('catalog/product')-&gt;canUseCanonicalTag()): ?&gt;
&lt;meta property="og:url" content="&lt;?php echo trim(Mage::registry('current_product')-&gt;getProductUrl()) ?&gt;"/&gt;
&lt;?php endif; ?&gt;
&lt;meta property="og:description" content="&lt;?php echo strip_tags(str_replace("&lt;br /&gt;",", ",substr(Mage::registry('current_product')-&gt;getDescription(), 0, strpos(Mage::registry('current_product')-&gt;getDescription(), '.')+1))) ?&gt;"/&gt;
&lt;meta property="og:image" content="&lt;?php echo Mage::helper('catalog/image')-&gt;init(Mage::registry('current_product'), 'small_image')-&gt;resize(100,100);?&gt;"/&gt;
&lt;?php else: ?&gt;
&lt;?php // Category page ?&gt;
&lt;!--Category page OG Meta tags--&gt;
&lt;meta property="og:title" content="&lt;?php echo trim(Mage::registry('current_category')-&gt;getName())?&gt;"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;helper('core/url')-&gt;getCurrentUrl() ?&gt;"/&gt;
&lt;meta property="og:description" content="&lt;?php echo htmlspecialchars($this-&gt;getDescription()) ?&gt;"/&gt;
&lt;?php if(trim(Mage::registry('current_category')-&gt;getImageUrl()=="")): ?&gt;
&lt;meta property="og:image" content="CATEGORY HAS NO IMAGE CONFIGURE MANUAL LINK TO A GENERIC CATEGORY IMAGE"/&gt;
&lt;?php else: ?&gt;
&lt;meta property="og:image" content="&lt;?php echo trim(Mage::registry('current_category')-&gt;getImageUrl())?&gt;"/&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php // ***** Detect CMS page ?&gt;
&lt;?php if(Mage::getSingleton('cms/page')-&gt;getIdentifier() == 'home'  &amp;&amp; Mage::app()-&gt;getFrontController()-&gt;getRequest()-&gt;getRouteName() == 'cms' ) : ?&gt;
&lt;!--Home page OG Meta tags--&gt;
&lt;meta property="og:title" content="THIS IS THE MAIN CMS HOME PAGE"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;helper('core/url')-&gt;getCurrentUrl() ?&gt;"/&gt;
&lt;meta property="og:description" content="MY DESCRIPTION"/&gt;
&lt;meta property="og:image" content="MANUAL LINK TO A GENERIC IMAGE"/&gt;
&lt;?php endif; ?&gt;</pre>
<p>First we add the site default OG Meta Tags including two Facebook tags to identify the Facebook admininstrator ID for this content and an associated Application ID. Add your Facebook account ID and app ID here. To register a Facebook application simply login to Facebook,  goto <a href="http://www.facebook.com/developers/apps.php">http://www.facebook.com/developers/apps.php</a> and click on the &#8220;Set up new app&#8221; button. Give your app a name and set the domain name for the app &#8211; the domain name must match the domain the Like button is installed on for it to work, and save it. In the application settings or on the MyApp page you will see your Application ID number.</p>
<p>The information in these tags will be used by Facebook when they &#8220;scrape&#8221; your page the first time someone clicks on a product page Like Button.</p>
<p>Then we specify the Open Graph tags that will appear when we detect a product, category or cms pages. For CMS pages you need check for each CMS page name you wish to place a like button on, i.e. in the code example we are checking for a page called &#8220;home&#8221;. For CMS pages you need to also manually set the URL to an image. For category and sub category pages we can check for a configured category image, if non exists then use a manually configured default image. For products we will take the default image from the product. Bundled products are not currently being detected, will need to work on a solution for that&#8230;</p>
<p>If you want to include specific OG Meta tags for a page with a specific url then use.</p>
<pre class="brush:php">&lt;?php if($this-&gt;helper('core/url')-&gt;getCurrentUrl() === 'http://www.mystore.com/my-specific-page-url.htmll') : ?&gt;
&lt;!-- Specific Page OG Meta--&gt;
&lt;meta property="og:title" content="SPECIFIC PAGE OG CONTENT TITLE"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="&lt;?php echo $this-&gt;helper('core/url')-&gt;getCurrentUrl() ?&gt;"/&gt;
&lt;meta property="og:description" content="SPECIFIC PAGE CONTENT DESCRIPTION"/&gt;
&lt;meta property="og:image" content="http://www.mystore.com/myimage.jpg"/&gt;
&lt;?php endif; ?&gt;</pre>
<p>Edit the open graph data for your own requirements and add or remove more tags as you wish. The name, description and URL tags for product and category pages can be populated automatically. The URL for products comes from our canonical URL extension and the product description uses the same method I used for <a title="Magento SEO – Generate META Description Tags Automatically" href="https://blog.gaiterjones.com/magento-seo-generate-meta-description-tags-automatically/">SEO description meta tags</a>, to create a meaningful description to use within Facebook from the product long description text. The same method could be used for category pages too, for CMS pages you may need to manually enter the description for each CMS page you want a Like Button to appear on, and check for the page name using the code above.</p>
<p>More information on the Open Graph tags can be found <a href="http://developers.facebook.com/docs/opengraph/" target="_blank">here</a>.</p>
<p>Save your files and refresh a product page. Check the source HTML to check that the Open Graph tags have been populated correctly for product, category, sub category and cms pages i.e. :</p>
<pre class="brush:xml">&lt;!--Default OG Meta tags--&gt;
&lt;meta property="og:site_name" content="My eCommerce Store"/&gt;
&lt;meta property="og:street-address" content="1 THE High Street"/&gt;
&lt;meta property="og:locality" content="London"/&gt;
&lt;meta property="og:postal-code:" content="SW1"/&gt;
&lt;meta property="og:country-name:" content="United Kingdom"/&gt;
&lt;meta property="og:phone_number" content="00441234567890"/&gt;

&lt;meta property="og:latitude" content="00.00000000000000"/&gt;
&lt;meta property="og:longitude" content="00.00000000000000"/&gt;
&lt;!--Product page OG Meta tags--&gt;
&lt;meta property="og:title" content="Nokia 2610 Phone"/&gt;
&lt;meta property="og:type" content="product"/&gt;
&lt;meta property="og:url" content="http://dev150.webshop.com/nokia-2610-phone.html"/&gt;
&lt;meta property="og:description" content="The Nokia 2610 is an easy to use device that combines multiple messaging options including email, instant messaging, and more."/&gt;
&lt;meta property="og:image" content="http://dev150.webshop.com/media/catalog/product/cache/1/small_image/100x100/9df78eab33525d08d6e5fb8d27136e95/n/o/nokia-2610-phone-2.jpg"/&gt;</pre>
<h2>Add the Magento Facebook Like Button &#8211; XFBML or IFrame?</h2>
<p>Now we are all prepared to add our Like Button. You can render the Like Button and javascript code using two methods, XFBML or Iframe. There are pros and cons to both and you might already be averse to using Iframes on your pages. They both achieve the same result with the main difference being that the XFBML is slightly more versatile (and also perhaps quicker) allowing for a comment to be left after you have clicked the button, and also providing methods to trigger actions after the click.</p>
<p>Best practice recommends using XFBML but there is another reason for using the Iframe version that might interest you. If you sell the same product in multiple stores for example a Retail and a Wholesale store and the stores have different domains then using XFBML will result in two entries for the same product within Facebook because the domain name in the URL for the product must match the domain name of the page that executes the XFBML code. Using the Iframe method allows us to specify the domain ourselves and due to the nature of an Iframe Facebook has no way of confirming if it matches  the domain of the parent page of the Iframe or not. Another way to illustrate this is that if you develop your XFBML Facebook Like button on your development server and make test &#8220;Like&#8221; clicks on product X, Facebook will see this as <em>http://your.develeopment.server/productX</em> when you move the code to your live server, your &#8220;Likes&#8221; will be lost because Facebook will now register a new Open Graph object at <em>http://your.live.server/productX</em>. Whereas using the Iframe we can specify<em> http://your.live.server/productX</em> as the URL both on the live and development server.</p>
<h2>Magento Facebook XFBML Like Button</h2>
<p>Lets implement the XFBML version first. To add the Like Button to our product pages we need to locate <em>view.phtml</em> in the <em>/template/catalog/product</em> folder of our theme. Open <em>view.phtml</em> and look for the element or div that renders the product-name, around about line 50. We can locate the Facebook like button directly under the product name in the default theme, or you can locate it where you wish on your themes product page either by moving the code or positioning the button using a CSS class. Add the following code first :</p>
<pre class="brush:php">&lt;div id="facebook_like_product_button"&gt;&lt;fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"&gt;&lt;/fb:like&gt;&lt;/div&gt;</pre>
<p>This defines how our button looks and there are various options that you can experiment with to get the button you want. Note the DIV ID (or class) can be changed/added to whatever you want to style or move the button within the page. Take a look at <a href="http://developers.facebook.com/docs/reference/plugins/like/">http://developers.facebook.com/docs/reference/plugins/like/</a> to experiment with the different button style options available. This is what they look like with <em>standard</em>, <em>button count</em> or <em>box count</em> layout styles :</p>
<figure id="attachment_125" aria-describedby="caption-attachment-125" style="width: 324px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image2.jpg"><img loading="lazy" decoding="async" class=" " style="border: 1px solid #DDDDDD;" title="Examples of different Like Button render options" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image2.jpg" alt="Examples of different Like Button render options" width="324" height="161" /></a><figcaption id="caption-attachment-125" class="wp-caption-text">Examples of different Like Button render options</figcaption></figure>
<p>Now we need to pull the Javascript SDK code from Facebook. <a href="http://developers.facebook.com/docs/reference/javascript/" target="_blank">Facebook </a>says &#8220;The most efficient way to load the SDK in your site is to load it  asynchronously so it does not block loading other elements of your page.   This is particularly important to ensure fast page loads for users and  SEO robots/spiders.&#8221; To access the SDK requires your Facebook application ID from Facebook. We can set the Like Button language with a locale code, add a translation for <em>en_US</em> to your Magento language files to change the language to match your store i.e. <em>de_DE</em> for German.</p>
<p>Add the following code next with your Facebook APP id, you can add it directly after the Button code on your product page if you will only be using like buttons on product pages. Or add it to your<em> header.phtml </em>template file to load it with every Magento page.</p>
<pre class="brush:xml">&lt;!-- Facebook Like Product Button BEGIN - load the SDK asynchronously --&gt;
	&lt;div id="fb-root"&gt;&lt;/div&gt;
		&lt;script&gt;
		/* &lt;![CDATA[ */
			window.fbAsyncInit = function() {
			FB.init({appId: 'YOUR FACEBOOK APP ID', status: true, cookie: true,
				xfbml: true});
		};
		(function() {
			var e = document.createElement('script'); e.async = true;
			e.src = document.location.protocol +
			'//connect.facebook.net/&lt;?php echo $this-&gt;__('en_US') ?&gt;/all.js';
			document.getElementById('fb-root').appendChild(e);
		}());
		 /* ]]&gt; */
		&lt;/script&gt;
&lt;!-- Facebook Like Product Button END --&gt;</pre>
<p>Notice that the Javascript code performs a protocol check to ensure that the link to Facebook matches the protocol of the page, i.e. HTTP or HTTPS, this is important when linking to external content to avoid browsers security errors when using an SSL connection.</p>
<h2>Testing</h2>
<p>Save your changes and refresh your product page to see your shiny new Like Button. Remember you should test all the popular browsers to ensure the code is working and the button displays correctly. Your browser tests should include, Internet Explorer, Firefox, Chrome, Opera and Safari and remember to test HTTPS access too. I also recommend that you <a href="http://www.asymptoticdesign.co.uk/cgi-bin/check-url.pl " target="_blank">check how your page looks to crawlers like Google Bot,</a> an error in the header of your page may render ok for normal browsers but not for a crawler bot. You can also do a page fetch test from within <a href="http://www.google.com/webmasters/tools" target="_blank">Google Webmaster Tools</a>. I learned this the hard way with a site becoming deindexed in Google due to a error in the header PHP code that was only being triggered by crawler Bots!</p>
<figure id="attachment_124" aria-describedby="caption-attachment-124" style="width: 518px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image11.jpg"><img loading="lazy" decoding="async" class="hang-1-column    " style="border: 1px solid #dddddd;" title="Like Button - Magento 1.3.x Product Page Example" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image11.jpg" alt="Like Button - Magento 1.3.x Product Page Example" width="518" height="299" /></a><figcaption id="caption-attachment-124" class="wp-caption-text">Like Button - Magento 1.3.x Product Page Example</figcaption></figure>
<p>Go ahead and click on it (if you like it!) This will trigger Facebook to scrape your page and the &#8220;Like&#8221; should appear in your Facebook profile feed with the image, and title from your Open Graph tags.</p>
<figure id="attachment_196" aria-describedby="caption-attachment-196" style="width: 472px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/liked-it1.jpg"><img loading="lazy" decoding="async" class="hang-1-column      " style="border: 1px solid #dddddd;" title="Facebook Marketing Like - example news feed post" src="https://blog.gaiterjones.com/wp-content/uploads/2011/03/facebook-like-example-updated.jpg" alt="Facebook Marketing Like - example news feed post" width="472" height="163" /></a><figcaption id="caption-attachment-196" class="wp-caption-text">Facebook Marketing Like - example news feed post</figcaption></figure>
<p>To add the Like Button to a category page add the same Button code above to locate <em>view.phtml</em> in the <em>/template/catalog/category </em>folder of your theme. Open <em>view.phtml</em> and look for the element or div that renders the category-name and add the code just below it. Note that depending on your theme there will be multiple occurences of the category name for different category views in this file.</p>
<figure id="attachment_322" aria-describedby="caption-attachment-322" style="width: 417px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/magento-facebook-like-button-category-page1.jpg"><img loading="lazy" decoding="async" class="hang-1-column      " style="border: 1px solid #dddddd;" title="Magento Facebook Like button category page example" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/magento-facebook-like-button-category-page1.jpg" alt="Magento Facebook Like button category page example" width="417" height="205" /></a><figcaption id="caption-attachment-322" class="wp-caption-text">Magento Facebook Like button category page example</figcaption></figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Remember for Facebook to scrape your page the URL must be valid and accessible from the Internet, so if you are working on a development server it must be also accessible from the Internet. It can take a while for the Open Graph data to be collected and to appear correctly in Facebook. If you want to manually check that your Open Graph data is accessible use the Facebook Lint tool at <a href="http://developers.facebook.com/tools/lint">http://developers.facebook.com/tools/lint</a>. Enter the canonical URL of a product page and Facebook will return the scraped Open Graph meta data for you to verify.</p>
<figure id="attachment_134" aria-describedby="caption-attachment-134" style="width: 520px" class="wp-caption alignnone"><a href="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image32.jpg"><img loading="lazy" decoding="async" class="hang-1-column    " style="border: 1px solid #DDDDDD;" title="Verify Open Graph meta data with the Facebook Lint Tool" src="https://blog.gaiterjones.com/wp-content/uploads/2011/02/Image32.jpg" alt="Verify Open Graph meta data with the Facebook Lint Tool" width="520" height="323" /></a><figcaption id="caption-attachment-134" class="wp-caption-text">Verify Open Graph meta data with the Facebook Lint Tool</figcaption></figure>
<h2>Magento Facebook IFrame Like Button</h2>
<p>For completeness lets also look at implementing the Like Button using an IFrame, remember this can be useful because it allows <em>cross domain Like buttons</em>, i.e. buttons for the same content that will work when served from different website domains.</p>
<p>Unlike the XFBML code, the IFrame must specify the Like URL within the IFrame element so for Magento 1.3.x we need to generate the IFrame code in the header so that we can call the Canonical URL extension code. Add the following code at the end of <em>head.phtml </em>for <strong>Magento 1.3.x</strong></p>
<pre class="brush:xml">&lt;?php if (Mage::registry('current_product')) : ?&gt;
&lt;script type="text/javascript"&gt;
function fbLike(){
        return '&lt;iframe src="http://www.facebook.com/plugins/like.php?href=&lt;?php echo str_replace($this-&gt;getBaseUrl(),"http://www.YOUR-DOMAIN.com/",$this-&gt;_data['urlKey']) ?&gt;&amp;locale=&lt;?php echo $this-&gt;__('en_US') ?&gt;&amp;layout=button_count&amp;show_faces=false&amp;width=150&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;';
    }
&lt;/script&gt;
&lt;?php endif; ?&gt;</pre>
<p>For <strong>Magento 1.4.x and 1.5.x </strong>you can either add the IFrame code directly to<em> view.php</em> or call it with the Javascript function in <em>head.phtml</em>. To use the Javascript function add the following to <em>head.phtml</em></p>
<pre class="brush:xml">&lt;?php if (Mage::registry('current_product')) : ?&gt;
&lt;script type="text/javascript"&gt;
function fbLike(){
        return '&lt;iframe src="http://www.facebook.com/plugins/like.php?href=&lt;?php echo str_replace($this-&gt;getBaseUrl(), "http://www.YOUR-DOMAIN.com/", trim(Mage::registry('current_product')-&gt;getProductUrl())); ?&gt;&amp;locale=&lt;?php echo $this-&gt;__('en_US') ?&gt;&amp;layout=button_count&amp;show_faces=false&amp;width=150&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;';
    }
&lt;/script&gt;
&lt;?php endif; ?&gt;</pre>
<p>This code generates the IFrame html using a Javascript function that is called from the product page. Note that to keep the URL constant we replace the base host and domain name to be used for the Like Button with the domain name of the host site (or whatever we want). Edit www.YOUR-DOMAIN.com to match the URL of your site/store.</p>
<p>Now open up <em>view.phtml</em> and as with the XFBML solution add the following code after the product name, or wherever you want within the product view page of your theme.</p>
<pre class="brush:xml">&lt;!-- Facebook Like Button BEGIN --&gt;
&lt;div id="fb-root"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
document.write(fbLike());
&lt;/script&gt;
&lt;!-- Facebook Like Button END --&gt;</pre>
<p>This simply calls the Javascript function created in <em>head.phtml</em> which returns the HTML for the IFrame. For Magento 1.4, 1.5 you can also replace the script code directly with the IFrame code in <em>view.phtml</em>:</p>
<pre class="brush:xml">&lt;!-- Facebook Like Button BEGIN --&gt;
&lt;div id="fb-root"&gt;&lt;/div&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=&lt;?php echo str_replace($this-&gt;getBaseUrl(), "http://www.YOUR-DOMAIN.com/", trim(Mage::registry('current_product')-&gt;getProductUrl())); ?&gt;&amp;locale=&lt;?php echo $this-&gt;__('en_US') ?&gt;&amp;layout=button_count&amp;show_faces=false&amp;width=150&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;!-- Facebook Like Button END --&gt;</pre>
<p>Refresh the product page to see the IFrame version of the Like Button.</p>
<h2>Positioning the Facebook Like Button</h2>
<p>To style the button or to adjust its position on the product view page wrap the Facebook code in a DIV i.e. &#8220;<em>facebook_like_product_button</em>&#8221; and create a matching style CSS ID or class. For example to pad the button out a little add the following to your CSS:</p>
<pre class="brush:css">/*Facebook Like Button*/
#facebook_like_product_button {
padding-top: 1em;
}</pre>
<h2>Like Button for your facebook page</h2>
<p>If you want your main home page like button to Like an existing Facebook page simple modify the Like button code to include the URL of your Facebook page:</p>
<pre class="brush:xml">&lt;fb:like href="http://www.facebook.com/YOUR.FACEBOOK.PAGE" ref="product_page" layout="button_count" show_faces="false" width="120"&gt;&lt;/fb:like&gt;</pre>
<h2>Conclusions</h2>
<p>Now that the like button is working you will want to check which products are receiving button clicks, use the Facebook Insight tool to look at the statistics for your product page Likes &#8211; <a href="http://www.facebook.com/insights/">http://www.facebook.com/insights/</a> You may need to first click the green &#8220;statistics for your domain&#8221; button to link your domain to your Facebook profile. You can also integrate reporting into Google Analytics, see the blog post below. Topics for another post include how to target customers that have liked your products individually by sending them specific product updates via Facebook.</p>
<p>Note that the code posted here was tested with <strong>Community Editions</strong> of Magento only.</p>
<p>In part two of this Social Media Marketing for Magento tutorial we will  integrate <a title="Magento Product Social Media Marketing Part 2 – the AddThis Toolbar" href="https://blog.gaiterjones.com/magento-product-social-media-marketing-addthis-toolbar/">300+ more Social Marketing destinations</a> into Magento product pages using the <em>AddThis</em> toolbar.</p>
<h1><strong>More Reading</strong></h1>
<p><a href="http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/">http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/<br />
</a><a href="http://developers.facebook.com/docs/reference/plugins/like/"><br />
http://developers.facebook.com/docs/reference/plugins/like/</a></p>
<p><a href="http://developers.facebook.com/docs/best-practices/">http://developers.facebook.com/docs/best-practices/</a></p>
<p><a href="http://www.websharedesign.com/blog/how-do-i-track-that-little-facebook-like-button-in-google-analytics.html">http://www.websharedesign.com/blog/how-do-i-track-that-little-facebook-like-button-in-google-analytics.html</a></p>
<p><a href="http://developers.facebook.com/docs/opengraph/">http://developers.facebook.com/docs/opengraph/</a></p>
<p><a href="http://garethhooper.com/articles/social-media/45-integration/158-how-to-correctly-add-the-facebook-social-plugins-to-your-website.html">http://garethhooper.com/articles/social-media/45-integration/158-how-to-correctly-add-the-facebook-social-plugins-to-your-website.html</a></p>
<p>Updated Facebook Like Button</p>
<p><a href="http://soshable.com/facebook-like-butto">http://soshable.com/facebook-like-butto</a></p>
<p><a href="http://www.techi.com/2011/02/why-the-facebook-like-button-change-is-a-bait-and-switch/">http://www.techi.com/2011/02/why-the-facebook-like-button-change-is-a-bait-and-switch/</a></p>
<p><a href="http://davehiren.blogspot.com/2010/08/detect-product-page-in-magento.html">http://davehiren.blogspot.com/2010/08/detect-product-page-in-magento.html</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-social-media-marketing-facebook-like-button/feed/</wfw:commentRss>
			<slash:comments>33</slash:comments>
		
		
			</item>
	</channel>
</rss>
