Running Facebook application on localhost -


i planning connect facebook chat localhost. need session key facebook. when give site url localhost:8080 or ip-address:8080 not work.

i read setting 2 apps 2 different api keys 1 runs on dev m/c , other on localhost did not quite it.

can explain how run facebook app on localhost?

i wrote tutorial while ago.

the important point "site url":

site url: http://localhost/app_name/

where folder structure like:

app_name ¦   index.php ¦ +---canvas ¦   ¦   index.php ¦   ¦ ¦   +---css ¦           main.css ¦           reset.css ¦ +---src         facebook.php         fb_ca_chain_bundle.crt 

edit:
kavya: how fb server recognize localhost without ip or port??

i don't think has facebook, guess since iframe src parameter loaded client-side it'll treat local url if put directly on browser.

for example have file on online server content (e.g. online.php):

<iframe src="http://localhost/test.php" width="100%" height="100%">     <p>not supported!</p> </iframe> 

and on localhost root directory, have file test.php:

<?php echo "hello localhost!"; ?> 

now visit http://your_domain.com/online.php see localhost file's content!

this why realtime subscriptions , deauthorize callbacks (just mention) won't work localhost urls! because facebook ping (send http requests) these urls facebook server won't translate urls yours!


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -