HomePHP Page 4 - Facebook PHP API Applications: Basic Introduction
The Recommendations Widget Facebook Plugin - PHP
If you are a PHP developer interested in learning the PHP API applications of Facebook, then this tutorial can help you get started. Keep reading and you'll soon know not only how to add Facebook features to your website, but how to develop your own Facebook applications.
Sometimes when the user visits your website, he/she will have no clue as to what your best content is. You can make recommendations, but it might require you to write some complex PHP code. You can also use the most commented post of your blog, but this does not mean that it is the best content.
Therefore, the best content on your website is highly correlated to the number of Facebook users liking a specific piece of content. But how can you display at a single glance the best content of your website?
This is where you will use the Facebook "Recommended" Plugin. This is how it works:
Step 2: Under "Domain," enter your domain. This can be tricky, especially if you are using sub-domains. So here is a quick guide:
To display recommended content for your root domain (e.g www.devshed.com), enter that URL under "Domain" (with the www).
To display the recommended content for your sub-domain, e.g. forums.devshed.com, enter the sub-domain URL under "Domain." In this case, it will be: forums.devshed.com
Step 3: Configure the width, height and the other elements to create a good widget that you can paste into your website's HTML source code.
After the configuration, your output should be similar to the screen shot shown below:
Step 4: Finally, to get the code, simply click "Get Code" and then paste the code into your web page.