deadmantfa
(Wenceslaus Dsilva)
July 19, 2014, 7:26am
1
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?
deadmantfa
(Wenceslaus Dsilva)
July 19, 2014, 12:55pm
2
Can anyone please help me? I am using Yii 1.1.15, Please its really urgent
aruna470
(Aruna470)
July 19, 2014, 1:59pm
3
Hi,
I had the same issue when configuring Amazon SDK which also using the namespaces. I think that procedure will help you.
Place extracted Facebook SDK folder(facebook-php-sdk-v4-4.0-dev) inside protected/vendor and rename it as FbSDK
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
In your action
require ‘autoload.php’; // Better put this on beforeAction of the controller
$session = new Facebook\FacebookSession(‘access token here’);
Thanks,
Aruna