Welcome Guest, Not a member yet? Register   Sign In
Facebook Controller

[quote author="fatigue" date="1248371941"]Sorry, I didn't get it same error. Maybe better for you if you search "disallowed characters" in this forum.[/quote]

He needs to set up his application canvas mode as FBML instead of default IFrame.

function index()
       // Retrieve the user's friends and pass them to the view.
       $data['friends'] = $this->facebook->api_client->friends_get();
       $this->load->view('welcome_message' ,$data);

You try to load the view page 'welcome_message'. But then you saved your view page as 'welcome_view'.

Should it be $this->load->view('welcome_view' ,$data)?

Thanks a lot!

I got your sample codes working.

Could you also share any resource (web sites, books, social media resource, face book open source systems etc.) you have used and you are using about face book application? Not limited to but specially Codeigniter and face book application development?

Face book said there are 1 million face book developers, I would assume large part of them are php developers.

Not so many good online resources available though. Yours is one of the best. But I only found start tutorial like this. Not too many comprehensive guides available.

By the way.

Did you ever work on google map api in your face book application? specially based on this sample code?

For example,

<fb:iframe src="http://facebook.foliosystems.ca/facebook/google_map.php" smartsize=true></fb:iframe>

if the src='...' is a traditional php site, it is fine. but if the src is CI site, then I get the error message of "not found the page".

it seems the iframe src CI site and conflict with the facebook application CI site.

Information for people using the same sample codes that may have the same problem. I found this thread to solve the above problem of <fb:iframe src='...'


Instead set up

$config['uri_protocol'] = “PATH_INFO”;

like this thread said, I need to set

$config['uri_protocol'] = "ORIG_PATH_INFO";

It works fine now.

But I am so sure what is the logic here.

In simple words

$config['uri_protocol'] = "ORIG_PATH_INFO";

to make the fb iframe work, why?

[quote author="blackhorse66" date="1248659414"]

You try to load the view page 'welcome_message'. But then you saved your view page as 'welcome_view'.

Should it be $this->load->view('welcome_view' ,$data)?[/quote]

Yes, you are correct. I edited my codes, and revised view file name as welcome_message.php.

I changed

$user = $this->facebook->require_login();


$this->user = $this->facebook->require_login();

in MY_Controller.php.

So I can use the log in user id value later on by using $this->user.

Yes, I revised my MY_Controller.php codes. I added below sentence also.
public $user;

$profile_field_array = array(

In traditional php programming, I just attach this at the end of facebookapi_php5_restlib.php, in the ci set up, the facebook client api is as plugin.

So where and how should I save the code above? Any suggestions? Thanks.

by the way, why this thread is not moving to the top based on the last posted date?

You can add this array to application/config/facebook.php file as
$config['profile_field_array'] = array(array(

And you shall call your array in everywhere like this:


Theme © iAndrew 2016 - Forum software by © MyBB