CodeIgniter Forums
load facebook php sdk from controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: load facebook php sdk from controller (/thread-33074.html)



load facebook php sdk from controller - El Forum - 08-14-2010

[eluser]niurexx[/eluser]
i try to load facebook from one of my controller but there is a problem with it.. when i run the code and view it using firebug.. an error 500 internal server error displayed..

my code

Code:
<?php


class facebook extends controller
{
    function __construct()
    {
        parent::controller();
    }
    
    function index()
    {
        require './facebook.php;
    }
}



load facebook php sdk from controller - El Forum - 08-14-2010

[eluser]pickupman[/eluser]
Simple syntax errors
Code:
class Facebook extends Controller
{
    function __construct()
    {
        parent::Controller();
    }
    
    function index()
    {
        require './facebook.php';
    }
}

You may want to check out the popular library for Facebook. [url="http://www.haughin.com/code/facebook/"]Facebook CI Library[/url]