Yii Application As Facebook Page Tab Application

Hi Guys and Gals,

I am creating a Yii application which will only load under the Facebook page of the customer, I have created the Facebook application and the page is showing the tab with my Yii app.

I need the Yii app to use the Facebook SDK 4.0 but I am unable to load the same as it uses the Namespaces.

Can someone please help me?

Can anyone please help me? I am using Yii 1.1.15, Please its really urgent

Hi,

I had the same issue when configuring Amazon SDK which also using the namespaces. I think that procedure will help you.

  1. Place extracted Facebook SDK folder(facebook-php-sdk-v4-4.0-dev) inside protected/vendor and rename it as FbSDK

  2. In your config/main.php

Yii::setPathOfAlias(‘FbSDK’,Yii::getPathOfAlias(‘application.vendor.FbSDK.src.*’)); // Place on top of the page

‘application.vendor.FbSDK.*’ // Add this to import section

  1. In your action

require ‘autoload.php’; // Better put this on beforeAction of the controller

$session = new Facebook\FacebookSession(‘access token here’);

Thanks,

Aruna