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 Works
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 “Top Seller” 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.
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.
Tested with Magento CE 1.6.1
I am looking for extension testers, download BETA version 0.26 (last updated 09-12-2011) of the extension here
Updates
If you use this extension be sure to update to the latest version.
* 0.22 – First beta release. 15.09.2011
* 0.23 – Developed Facebook integration and duplicate post control logic. 16.09.2011
* 0.24 – Improved Facebook posting, added logic to exclude posts for products in specified categories. 19.09.2011
* 0.25 – Added time range to stop being too spammy by restricting posts to specific hours of the day. 04.11.2011
* 0.26 – Fixed grouped products not being posted due to hidden child simple products of the parent group product.
Wishlist
Implement logic to control the duplication of product Tweets. Done – v0.23
Extend to other Social Media platforms, Facebook, etc. Facebook Support in v0.23
Implement hash tags for Twitter.
Add to Cart link in Facebook posts
Add option to use Short or Long description text.
Installation
Prerequisites :
Enable Magento scheduling system
Twitter Account
Twitter Application
Facebook Account
Authorised Facebook Application
Bit.ly Account (optional)
To install this extension:
1. Unzip the module and copy the contents of the modules app folder to the app folder of your Magento store installation.
2. 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.
3. Refresh the Magento Store cache
4. Logout and login back into the admin backend, goto System – Configuration and locate the configuration settings under My Extensions – Social Media Marketing.
Configuration
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.
Twitter is enabled by default, Facebook is disabled by default.
2. Define a headline prefix for the product marketing text, the default if left blank is “Top Seller:” To disable this prefix enter NONE. For Facebook you can define the text to use for the post header. Define the “uniqueness” 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.
3. Configure Google UTM tags for traffic tracking in Google analytics.e.g. ?utm_source=SocialMediaMarketing&utm_medium=Top-Seller&utm_campaign=MyCampaig
4. Enable email alerts which will help you debug the module during testing.
5. Save the extension configuration settings and test.
Testing
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.
To force the Magento scheduler to run navigate to http://www.yourwebshop.com/cron.php. 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 YES in the configuration.
ENABLE MAGENTO SCHEDULING
Magento uses a single file named cron.php 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):
*/5 * * * * /usr/bin/php -f /PATH-TO-MAGENTO/cron.php
Alternatively for testing you can execute cron.php from your browser by browsing to
http://www.yourstore.com/cron.php
TWITTER Configuration
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.
1. If you do not already have a Twitter account, create an account at http://www.tiwtter.com
2. Go to https://dev.twitter.com/ and login with your Twitter credentials.
3. Click the Create an App link.
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 “Create your twitter app” button to continue.
5. Goto the application settings tab and ensure your application is set to Read and Write and click Update Setting to continue.
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.
7. Copy each authentication token into the configuration settings of the module and click save.
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.
You can confirm your application is enabled and has access to your Twitter account by going to account settings -> applications in Twitter.
FACEBOOK CONFIGURATION
Login to Facebook and then browse to
http://developers.facebook.com/
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.
The application must be authorised for your Facebook page to work.
To authorise the application for your page edit the following URL and paste to your browser, replaceing YOURAPIKEY and YOURPAGEID..
facebook.com/connect/prompt_permissions.php?api_key=YOURAPIKEY&v=1.0&next=http://www.facebook.com/connect/login_success.html?xxRESULTTOKENxx&display=popup&ext_perm=publish_stream&enable_profile_selector=1&profile_selector_ids=YOURPAGEID
BIT.LY CONFIGURATION
To create a Bit.ly account goto http://bit.ly and register an account. Once registered obtain your API key by clicking on Account -> 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.
Alexander says:
Extension without any results. After place a test order, the success page is blank, nothing found in the cache directory and nothing found an Twitter. Tested with Magento 1.5.1.0
PicikeEvetke says:
After i authorize my application, i get this facebook error:
ERROR: This endpoint has been deprecated. To temporarily reenable it, you may disable the “august_2012” platform migration. It will be disabled permanently on August 1, 2012.
What’s that?
PAJ says:
I haven’t seen this error from facebook before, there are some references to it when you Google it.
PAJ says:
Use this URL to authorise you facebook app to publish to your page.
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&redirect_uri=YOUR_REDIRECT_URL&scope=read_stream,publish_stream,offline_access,manage_pages
Todorov says:
IS this work in magento 1.7.0.2