Thanks for purchasing GiftScript! Please check CodeCanyon often for free updates and new scripts! This integration guide will help you get your new application (or modification of) set up quickly and as hassle-free as possible. Please, do not hesitate to send me an email if you have any questions!
This section will help you create a new application on Facebook.
GiftScript comes in a ZIP package. Simply unzip the package and upload the contained folders to a directory of your choice on your server. You do not need to upload the SQL file to your server.
You do, however, need to import the SQL file to your MySQL database. If you are using phpMyAdmin, there should be a handy button on the top navigation menu that says 'import'. Use this to import the SQL file.
You may now move to the section Application Setup.
This section will help you create a new application on Facebook.
Before proceeding further, please log into your Facebook account.
If you have never set up an application on Facebook before, you will need to add the Facebook Developer application. This can be accessed at http://www.facebook.com/developers. Once you allow access to the application, you can continue.
You can now create your new application. Firstly, insure that you are on this web page: https://developers.facebook.com/apps.
In the top left corner of your viewport, you will see the +Create New App button. Click on the button to begin creating a new application. You can then choose your application's name and language. You must also agree to the Facebook Terms before creating your application. Once you have chosen your application's name and language and accepted the Terms, click continue.
Once you have passed the security CAPTCHA, you will be able to edit your application's settings. While I will explain what some of the items in the settings area are, you should take the time to explore what all of these settings do at a later date.
Firstly, you can add an application icon. It is a small, 16x16 pixel image that will appear next to your application in a user's bookmarks once they have added the application (for quick and easy access). Simply click 'edit icon' to add your own icon.
The next settings appear sequentially down the page:
The next section of the settings asks you to select how your application integrates with Facebook. GiftScript is meant to be displayed on the Facebook Canvas. Select App on Facebook as the proper setting.
You need to enter data for both the Select Canvas URL setting and the Select Secure Canvas URL setting. The only difference between the two is that the secure setting should begin with https:// and the normal setting should start with http://
Enter the web path to your Giftscript folder on your server for both settings. An example: http://www.mysite.com/giftscript/ & https://www.mysite.com/giftscript/
Keep in mind that you must have an SSL certificate for your server for the script to work. Facebook is requiring this on all canvas applications. You can find a free SSL certificate provider at http://www.startssl.com/. You will need to work with your hosting service to properly add the certificate to your server. I will not be able to help you with this.
You may now save your changes.
To the left-hand side of your viewport, you will see two navigational buttons - Basics and Advanced You have been completing the Basics part of the settings. You can now click on Advanced to finish your application setup.
Most of these settings you should not be touching. They are already set to the proper setting. I will explain a few of these settings, though. In the future before you decide to change any setting, please read up on all of these available settings before changing any of them. If I do not mention a setting here, you have no need to alter the setting.
You may not continue to the section File Modification.
You will need to edit a single file. You can do this before or after uploading. Open the file masterfile.php. While there are comments in the file to help you, I will explain what to edit here as well.
You will need to edit a handful of variables in this file. You will get most of this information from your application settings which you modified a short time ago.
$app_info['admins'] -This is a comma-separated array of Facebook user ids for administrators to the script. All admins can modify gifts.
$app_info['show_uid'] - If you don't know your Facebook ID, I have provided this option for you to find it. Simple enable it by setting the option to '1'. This will show your Facebook User ID in place of your name on the script.
$app_info['id'] - This is your application's identification number. To find this, visit https://developers.facebook.com/apps and view your application's information.
$app_info['canvas'] - This is your application's namespace.
$app_info['name'] - This is your application's name.
$app_info['secret'] - This is your application's secret key. It is found in the same location as your application's identification number.
$app_info['points_name'] - This is the name for your application's virtual currency. This is what users will earn to unlock new gifts.
$app_info['gift_display'] - This is the number of gifts to display in the fading banner on the store page. The script will pull this amount of gifts from the database to show. You can set this variable to '0' to disable.
$app_info['point_amount'] - This is the number of points to give a user when they send a gift AND it is accepted by their friend.
$app_info['copyright_notice'] - This is a small notice in the top right of the application. I use it as a copyright notice.
$app_info['referral'] - This setting enables you to earn money from referral links to CodeCanyon. If enabled, it shows a button that will direct users to this script on CodeCanyon.
$app_info['cc_username'] - This is your CodeCanyon username, to be used with your referral link if you have this option enabled.
$nav_info['home'] - This is the text for the 'Home' navigational button.
$nav_info['shop'] - This is the text for the 'Shop' navigational button.
$nav_info['history'] - This is the text for the 'Gift History' navigational button.
$nav_info['invite'] - This is the text for the 'Invite' navigational button.
$nav_info['about'] - This is the text for the 'About' navigational button.
$nav_info['referral'] - This is the text for the 'referral' button.
$app_info['main_background'] - This is the color of the main background. Use HTML color hex codes in this variable. The default value is #eceff6.
$app_info['main_border'] - This is the color of the border for the main background. Use HTML color hex codes in this variable. The default value is #d4dae8.
$app_info['page_title'] - This is the color of the large title text on some pages (such as that of the 'About' page). Use HTML color hex codes in this variable. The default value is #6f6f6f.
$sql_server - The name of your SQL server. More often than not, 'localhost' will suffice.
$sql_database - The name of your SQL database.
$sql_user - The database username.
$sql_password - The database user's password.
Save your changes to your file and upload the file if you have not done so already.
Congratulations! You have finished your application's setup! Your application is now ready!
You're ready to begin working with your new app. While there are some things to be done,
there isn't too much to do.
You'll need to make your app look unqiue to drive users to your app. I've provided you
with the images from the demo application. You can view them in the images folder which is inside the main giftscript folder..
Eventually, you will upload your own images for your gifts. You should upload any gift images to the uploads folder, inside the images (take care not to upload them directly to the images folder).
Feel free to replace the images in the images folder with your own to help customize the look of your script (do not delete them though).
You will definitely want to replace the image header_background.jpg. I used the website
http://bannerfans.com
...to create a simple, custom banner. The size specifications for the background image is 728px x 75px.
Make sure to add some text to let people know what they're using! Remember, the header image is a
.jpg image.
You will also want to replace the gift_logo.png image. Try to get a square image with a transparent
background (as it will look the best) - more often than not those are .png images. The logo will be automatically be resized, so pick any size you want (but make sure its at least 100px by 100px large).
You can also replace the button images if you wish. There is a default and hover image to each, so make sure you replace both! Again, keep in mind the file extensions (buttons are PNG images).
****
Now you'll need to know how to use the admin panel. It's rather straightforward.
You first must create a new category, all gifts are put into categories. You can edit or remove categories
if you have at least 1. Removing a category will remove all gifts within the category as well, so be careful!
After creating a new category, you can add as many gifts as you like to a category. GiftScript currently
doesn't support multiple categories for the same gift, but hopefully will in the future.
When you create a gift, choose a name, category, cost, and description. Try to keep the description as short as possible but to the point.
You'll also need to give the gift an image. To do this, upload the image of your choice to the uploads folder. Then simply put the image file name in the image input when editing or adding the gift. Remember, images with transparent backgrounds will work best!
****
That should be it! Remember, if you have any questions don't hesitate to email me! I hope you enjoy your new app!