• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrate Facebook Php Client

I get a 404 not found.


Upon return from accepting the app in facebook?

Yes. I can't tell what is wrong Smile

I think it is because codeigniter will not accept the ?auth_token=9b3d912c6c90db5fbda697f24ddf4e83 at the end of my URL. I'm fairly new to CI and am not sure where to hack that in.

it will just strip it off, that shouldn't cause a 404. check your apache logs for errors.

Quote: - - [09/Aug/2007:12:29:36 -0400] "GET /fbook HTTP/1.1" 200 205 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20070725 Firefox/" - - [09/Aug/2007:12:29:36 -0400] "GET /favicon.ico HTTP/1.1" 404 551 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20070725 Firefox/" - - [09/Aug/2007:12:29:37 -0400] "GET /fbook?auth_token=8545975a1a1b2748195eabcf530f6126 HTTP/1.1" 404 551 "http://www.mycampuslinks.com/fbook" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20070725 Firefox/"

Does this give you any new info?



gives a 404 error on your server. wrong URL?

It might be as simple as missing a trailing slash on your setup:


I added the slash to the callback url, same 404 error however:


Is CI reading the ?auth_token... etc as a GET variable? Did I use your hack correctly?

This really has nothing to do with CI, and probably not even PHP. This:


is creating a 404 error on your server. Apache can't find a PHP/HTML file to use. Where is your CI app located? /htdocs/fbook/index.php? Do you have an apache rewrite going on?

[eluser]thunder uk[/eluser]
I can see your problem, I think.

First of all, go to the settings page for your application on facebook and make sure your callback url ends with a terminating slash



(edit) Oops - see you've done that bit already - me bad for not reading the whole thread. Undecided

Secondly, open your config.php file in your codeigniter installation (typically at docroot/system/aplication/config/config.php) and locate the entry for uri_protocol (around line 44)

Change it from "auto" to

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

Two things that have more or less the same result - making sure your codeigniter install doesn't think your requested controller is "/fbook?auth_token=8545975a1a1b2748195eabcf530f6126" rather than "/fbook" (the latter being correct!)


(edit again) Oops - is /fbook the "docroot" for your CI install or are you planning on serving your Facebook app out of a controller called fbook. In either case, the PATH_INFO bit should sort you out but you may need to modify your mod_rewrite code to accomodate the path

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.