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

#11
[eluser]mohrt[/eluser]
I get a 404 not found.

#12
[eluser]codelearn[/eluser]
Mohrt,

Upon return from accepting the app in facebook?

#13
[eluser]mohrt[/eluser]
Yes. I can't tell what is wrong Smile

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

#15
[eluser]mohrt[/eluser]
it will just strip it off, that shouldn't cause a 404. check your apache logs for errors.

#16
[eluser]codelearn[/eluser]
Quote:24.34.133.92 - - [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:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
24.34.133.92 - - [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:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
24.34.133.92 - - [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:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"

Does this give you any new info?

#17
[eluser]mohrt[/eluser]
yeah:

/fbook?foo=bar

gives a 404 error on your server. wrong URL?

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

/fbook/

#18
[eluser]codelearn[/eluser]
I added the slash to the callback url, same 404 error however:

http://www.mycampuslinks.com/fbook/?auth...10a4aacdac

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

#19
[eluser]mohrt[/eluser]
This really has nothing to do with CI, and probably not even PHP. This:

http://www.mycampuslinks.com/fbook/?foo=bar

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?

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

ie

Code:
http://www.mycampuslinks.com/fbook/

(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

Code:
$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!)

HTH


(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-2020 MyBB Group.