I can get FB_Ignited to work with the demo provided, but whenever I try it from the landing page of my site, it:
For some reason, on the start view, $this->fb_me isn't available.
Here's my Auth controller - this is hit when the FB button is hit from the landing page
class Auth extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('fb_ignited');
// The fb_ignited library is already auto-loaded so call the user and app.
$this->fb_me = $this->fb_ignited->fb_get_me();
$this->fb_app = $this->fb_ignited->fb_get_app();
// This is a Request System I made to be used to work with Facebook Ignited.
// NOTE: This is not mandatory for the system to work.
if ($this->input->get('request_ids'))
{
$requests = $this->input->get('request_ids');
$this->request_result = $this->fb_ignited->fb_accept_requests($requests);
}
}
function index($type="")
{
if (isset($this->request_result)) {
$content_data['error'] = $this->request_result;
}
if ($this->fb_me) {
$content_data['me'] = $this->fb_me;
}
$this->load->model('users');
$checkandadd = $this->users->checkandadd($this->fb_me);
$this->load->view('start', $content_data);
}
}
Not sure if it'll help, but here is what $this->facebook outputs (IDs and hashes intentionally tweaked):
Facebook Object
(
[appId:protected] => 123456123456123456
[apiSecret:protected] => 123456123456123456
[user:protected] => 0
[signedRequest:protected] =>
[state:protected] => 123456123456123456
[accessToken:protected] => 123456123456123456|123456123456123456
[fileUploadSupport:protected] =>
)
Some other notes:
*RECURSION*
shows up a few times whenever I print_r($this->fb_ignited)Anyone encounter something like this before?
In the latest version of Facebook Ignited you will find that I have taken care of that issue for people that do not have query strings enabled as well as user info not being loaded because I am using the latest Facebook PHP SDK. I suggest you upgrade to v1.1.2 which you can download with minimal changes to your CodeIgniter application.