Facebook PHP SDK not loading as a library in CodeIgniter - facebook

I'm having a problem simply loading the Facebook PHP SDK (v3.1.1) as library in CodeIgniter 2.0.
1) I've put the latest Facebook SDK files ('facebook.php', 'base_facebook.php', and 'fb_ca_chain_bundle.crt' ) into my application/libraries folder.
2) I've changed the filename of 'facebook.php' to 'Facebook.php'.
3) In my controller, I have the following code:
$fb_config = array(
'appId' => 'XXXXXXX',
'secret' => 'XXXXXXX'
);
$this->load->library('facebook', $fb_config);
$this->load->view('home_view');
But I just get an error and the View does not get loaded.
If I comment out the line
$this->load->library('facebook', $fb_config);
then the View loads correctly, so I know the problem is here.
4) If I try to autoload the facebook library, I get similar results.
Can anyone help? Thanks.

I figured out the problem.
I was missing the PHP cURL extension, so the code aborted in the “base_facebook.php” file when it checked if I had cURL installed. Not sure why I did not see any sign of a PHP Fatal Error.
After I installed this package, all is well.

Related

How can I get a google IdToken?

I am using this plugin: cordova-plugin-googleplus
After the user selects his Gmail correctly I get an object with a lot of different user informations
and on the backend side I use Java and followed this tutorial: backend-auth
Now I got the problem that I only get an Access Token via the googleplus plugin, but I need an IDToken. This is the code I used:
this.googlePlus.login({webclientId:'778525824123-83qa65tspdfd5c6i6roquf3dd41m3nk8.apps.googleusercontent.com'})
.then(res => {
console.log(res);
}
)
.catch(err => console.error(err));
Maybe there is something wrong with my webclientId? I don't know.
I solved it by not using the npm version, I used:
ionic cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-googleplus ......

Laravel 5 Fatal Error HtmlServiceProvider

I'm using Laravel 5.2 normally from composer,
already installed.
the first time I run php artisan server, there is no problem.
After create and modify some controller to add Html Form, I got an error when
I want to run php artisan serve,
D:\xampp\htdocs\bookstore>php artisan serve
PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::bindShared() in D:\xampp\htdocs\bookstore\vendor\illuminate\html\HtmlServiceProvider.php on line 36
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
How I can solve this one?
The illuminate/html component is no longer part of Laravel proper, and hasn't yet been updated to conform to 5.1 standards.
You need to remove:
'Illuminate\Html\HtmlServiceProvider',
and
'Form' => 'Illuminate\Html\FormFacade',
'Html' => 'Illuminate\Html\HtmlFacade',
form your config/app.php
then remove from your composer.json illuminate/html then add to your composer.json:
"laravelcollective/html": "5.*"
in require section
then run composer install

Could not securely load assembly (Unity 4.5.1 + Facebook Unity SDK 5.1)

I've just updated Unity from 4.3.4 to 4.5.1 and got this error with Facebook Unity SDK 5.1:
Could not securely load assembly from https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_5.1/CanvasFacebook.dll
I tried the fix explained in Unable to verify assembly data; you must provide an authorization key when loading this assembly but was unable to comment (not enough reputaion) so had to ask a new question.
string key = "B8GvecdX0rQ47kzhCEwlrRzYKA8LKeiZxy1HI3HfnhdgUATvBwQQViji8ot44dADM55QuHk5+hwrLso" +
"au32IDmRDQTclMSsTsIywGRo/nE5vbmRMMIECYXBFhliz+kvK0RWZ57XPxw0s7YhGnNLav0EE2QH/m+9a" +
"jlLOY+2ckxSoSEHLpotllyZLktRK+oFiDPvmzXLDUMOnwK9RFRSh2VBmoyWTZx8BYqWjqug3kAljJk/Xw" +
"TYZT9Ie+HvzLO5DBSqMNYbEX03WaNfpaq9GKBF/Oz37AHelf1Es36amP1v2Aut3nmIk2xxN6zwzBXyEyw" +
"90vJ/O8suikU+8kDDbZA==";
var assembly = Security.LoadAndVerifyAssembly(www.bytes, key);
Note that I added the fix code into the UNITY_4_5 section.
Is the key now wrong as it was given back in March?
I should note that I only see this error in one project. I have another project that also uses the Facebook Unity SDK but I don't see the error in that one.
UPDATE:
As of Monday 30 June the original issue seems to have been resolved. There's now no problem loading the assembly via the original code.
UPDATE 2:
Actually I've seen the secure load fail a few times since, but not always.

Struggling with Facebook.php

I have downloaded the latest version of facebook.php from here:
https://github.com/facebook/php-sdk/
...and have uploaded facebook.php and base_facebook.php and I have my correct api and api secret.
I have followed the exact code from phpfour here:
http://phpfour.com/blog/2010/05/quick-start-on-new-facebook-php-sdk-iframe-based/
And yet I am still gettng this error:
Fatal error: Call to undefined method Facebook::getSession()
What am I doing wrong?
Any ideas?
TheBounder.
As stated in this post (look answer number 6) getSession no longer exists in the API and that is the reason why you are getting the error.

Symfony 1.4x and sfTCPDFPlugin

I have installed sfTCPDFPlugin in my project, but when I try to test if the installation is alright (with the source found on the official site) I get the error:
Fatal error: Class 'TCPDF' not found in C:\wamp\www\mairie\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 12
How can I fix it?
Read the readme tab here : http://www.symfony-project.org/plugins/sfTCPDFPlugin
It says you have to download the tcpdf library, not only the sfTCPDFPlugin.
i faced with same problem, and i did the following task it will also help you.
first of all run: symfony plugin:uninstall sfTCPDFPlugin then remove the sfTCPDFPlugin directory form your plugin folder.
mow do the following setps:
1. cd your project path/symfony
2. symfony plugin:install sfTCPDFPlugin
3. download the tcpdf library unzip it and past into your sfTCPDFPlugin/lib now your directory looks like your project path/symfony/plugins/sfTCPDFPlugin/lib/tcpdf
now change your ProjectConfiguration.class.php to add $this->enablePlugins( array('sfTCPDFPlugin') ); now run the symfony plugin:publish-asstes and finally clear the cache symfony cc.