How Facebook Followers Help Your Business Website (Technical Guide of Facebook Graph API Integration in PHP)

Why should any business spend its resources creating and maintaining a Facebook fanpage?

After all, Facebook is a social network, not a shopping network.

People don’t come to Facebook with buying intentions, right?

But, still, most businesses today have their own Facebook fanpage maintained neatly.

While most people think of it as a tool for marketing their products, services, or brand. But, in reality, Facebook fan page helps business beyond just marketing.

Facebook helps to establish relationships and build community that can be beneficial for your business in multiple ways.

Although, before we dig into the subject of Facebook fanpage benefits, first we’ll see how to display follow us on Facebook option with Follower count using Facebook Graph API tutorial.

Now, when it’s the matter about obtaining the follower count, most developers think of access token in order to get the result. But, here, this small code snippet will help you obtain the Facebook follower count without access token to call Facebook graph API.

Start Code Integration

function getPageFanCount($page) {
$pageData = @file_get_contents(''.$page);
if($pageData) { // if valid json object
$pageData = json_decode($pageData); // decode json object
if(isset($pageData->likes)) { // get likes from the json object
return $pageData->likes;
} else {
echo 'page is not a valid FB Page';

In order to use the above function getPageFanCount(), you’ll need to pass page ID as parameter as below given code.

echo getPageFanCount($page = 'Arjunnetin');

And Done!

While it’s quite small function to implement, but integrating Facebook follower/like count on your business website could be benefit you greatly, as discussed.

For one thing, it helps you drive traffic and improves SEO of your business website. The fan pages have no restrictions, and Facebook encourages people to link to their websites. So, by redirecting even a small portion of Facebook traffic back to your business website can significantly improve quality of traffic as well as SEO of website.

Google and other search engines have started to index contents created on social sites like Facebook, Instagram, Twitter, etc. This means, not only your Fan Page content will have potential to generate extra traffic, but it’ll also strengthen the SEO of your website through backlinks.

Therefore, since you’ve enough reasons to implement Facebook Graph API in your PHP website, it’s your turn to take the opportunity and grow your business through Facebook. Now, if you’ve yet to develop the entire website for your business, it’s better to do the market analysis first. Check out the designs of your competitors or hire PHP developer to suggest you latest website design trends, and help you build your business website from scratch.


Would You Like to Develop Your Business Website? We Can Help!

Get your free consultation now

Leave a Reply

Your email address will not be published. Required fields are marked *