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

[eluser]searain[/eluser]
[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.
#12

[eluser]searain[/eluser]
Code:
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)?
#13

[eluser]searain[/eluser]
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.
#14

[eluser]searain[/eluser]
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.
#15

[eluser]searain[/eluser]
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='...'

http://www.simpleprojectz.com/2008/10/fa...deigniter/

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?
#16

[eluser]Fatih[/eluser]
[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.
#17

[eluser]searain[/eluser]
I changed

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

to

$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.
#18

[eluser]Fatih[/eluser]
Yes, I revised my MY_Controller.php codes. I added below sentence also.
Code:
public $user;
#19

[eluser]searain[/eluser]
Code:
$profile_field_array = array(
        "about_me",
        "activities",
        "affiliations",
        "birthday",
        "books",
        "current_location",
        "education_history",
        "first_name",
        "hometown_location",
        "hs_info",
        "interests",
        "is_app_user",
        "last_name",
        "meeting_for",
        "meeting_sex",
        "movies",
        "music",
        "name",
        "notes_count",
        "pic",
        "pic_big",
        "pic_small",
        "political",
        "profile_update_time",
        "quotes",
        "relationship_status",
        "religion",
        "sex",
        "significant_other_id",
        "status",
        "timezone",
        "tv",
        "wall_count",
        "work_history");

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?
#20

[eluser]Fatih[/eluser]
You can add this array to application/config/facebook.php file as
Code:
$config['profile_field_array'] = array(array(
        "about_me",
        "activities"
);

And you shall call your array in everywhere like this:

Code:
$this->config->item('profile_field_array')['about_me'];




Theme © iAndrew 2016 - Forum software by © MyBB