Facebook PHP SDK works only on localhost -


i have mobile app interfacing php facebook sdk fine until recently. sign in when have pointed @ localhost development server. frankly, i'm stumped. of course i've checked site url inside facebook developer center. pointed @ live server. yet development server sign in. suggestions?

these domains work: http://localhost:8888 http://testsite2:8888  these domains not work: http://*.com https://*.com 

as requested, here facebook code:

$config = array(); $config['appid'] = configure::read('fb_app_id'); $config['secret'] = configure::read('fb_app_secret'); $config['fileupload'] = false; // optional $facebook = new facebook($config);       $facebook->setaccesstoken($this->data['user']['fbtoken']); $receivedfbid = $facebook->getuser(); 

this works correctly on development server , used work fine on live server until recently. reiterate, facebook developer center configured "site url" live server. not problem.

enter image description here

i had same issue web app on webhost worked fine on localhost.

in case related curl , ssl.

a quick way see if ssl problem tell fb php sdk accept ssl cert, that, add base_facebook.php file:

$opts[curlopt_ssl_verifypeer] = false;     curl_setopt_array($ch, $opts); 

place right before $result = curl_exec($ch);

i know said tested on non ssl connections base_facebook.php file still looking ssl cert.
further reading see: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -