Problema with isJson()

1Votes

how to solve the problem below?

1 - Fatal error: Uncaught exception 'Eden_Oauth2_Error' with message 'Argument 1 in Eden_Oauth2_Abstract->isJson() was expecting string, however false was given.' in C:\wamp\www\test\Facebook\eden\oauth2\abstract.php on line 148

 

2 -  Eden_Oauth2_Error: Argument 1 in Eden_Oauth2_Abstract->isJson() was expecting string, however false was given. in C:\wamp\www\test\Facebook\eden\oauth2\abstract.php on line 148

 

 

Code:

 

 
//start session
session_start();
 
//instancia
require_once 'eden.php';
eden()->setLoader(true);
 
//get auth
$auth = eden('facebook')->auth('xxxxxx', 'xxxx', 'xxxxx');
 
//if no code and no session
if(!isset($_GET['code']) && !isset($_SESSION['fb_token'])) {
//redirect to login
$login = $auth->getLoginUrl();
 
header('Location: '.$login);
exit;
}
 
//Code is returned back from facebook
if(isset($_GET['code'])) {
//save it to session
$access = $auth->getAccess($_GET['code']);
$_SESSION['fb_token'] = $access['access_token'];
}

 

asked 4 years ago by Valdeir Psr facebook

Your Comment


1 Answers

0Votes

 

Hi !

I had the same problem, and I fixed it by adding this two lines into curl.php (in eden's folder):

 

curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
 
at line 274.
 
I hope this will help, but I think this problem will happen only when you are working in localhost...
answered 4 years ago by Aïssa Lahbabi

Your Comment


Your Answer



© 2012 Openovate Labs. All rights reserved.