Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 601197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:41:18+00:00 2026-05-13T16:41:18+00:00

I am building a Facebook app using iframe rendering. I want to use CodeIgniter

  • 0

I am building a Facebook app using iframe rendering. I want to use CodeIgniter for the back end and am wondering what all the settings should be set to for CodeIgniter and Facebook to get along. Specific settings I am wondering about are:

  1. Facebook’s canvas callback url (should it include the default controller and function)?
  2. config.php’s base_url, index_page, uri_protocol, enable_query_strings
  3. Anything else I might be missing

How I have the Facebook interaction set up currently is creating a new controller FB_Controller that is added to the libraries folder that every one of my controllers inherit from. FB_Controller inherits from Controller and has a property $facebook that is instantiated using the API key and secret upon construction. Not sure if this the best approach.

I am also using mod_rewrite to get rid of index.php and just so there’s no confusion here’s the code:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:41:18+00:00Added an answer on May 13, 2026 at 4:41 pm

    You shouldn’t have to do anything special to get Facebook to work with your CodeIgniter application.

    1. The canvas callback URL is the landing page for your app. This is the page that Facebook presents to the user after she has accepted your app. This would normally be the root URL of your app (the page corresponding to the index action method of your default controller). But you could set it to any URL you please.
    2. Set base_url to the root URL of your web app eg. http://www.example.com/myapp/ (remember to include the trailing slash). Set index_page to the empty string if you plan on removing index.php from your URLs. Leave uri_protocol and enable_query_strings as default unless you have a good reason not to.
    3. Again, you shouldn’t need to do anything special to make your CodeIgniter app compatible with Facebook.

    Like you, I don’t like having index.php in the URLs of my CodeIgniter apps so I remove them by enabling mod_rewrite for Apache and adding a .htaccess file to the root directory of my project with the following :

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ index.php/$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 285k
  • Answers 285k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Kind a doing your work, but - whatever. I would… May 13, 2026 at 4:41 pm
  • Editorial Team
    Editorial Team added an answer I'm not sure how reliable the image onload event is… May 13, 2026 at 4:41 pm
  • Editorial Team
    Editorial Team added an answer You can do this in place using jQuery: $(document).ready(function() {… May 13, 2026 at 4:41 pm

Related Questions

I am building a facebook platform web app using GWT and hosting it on
I am building a Facebook App which is heavy on Javascript. For this I
I am building a small facebook app. Trying to search for values in an
I can't seem to get a facebook connect app that I am building to
I am building a small facebook application, in which I am performing the following:

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.