Facebook App: localhost no longer works as app domain

后端 未结 13 1386
我寻月下人不归
我寻月下人不归 2020-11-28 02:33

I\'ve been writing a game for Facebook using Rails and jQuery. Since I started using the Facebook Javascript SDK, using localhost as an app domain seemed to work just fine.

13条回答
  •  悲&欢浪女
    2020-11-28 03:12

    For me it worked like this:

    Configuring the facebook app dashboard:

    *On the ' basic ' tab:

    1) Leaving app domain empty.

    2) Erasing any platform. Meaning: no website no canvas platform. (so no site-URL field to fill)

    *On the 'advanced' tab:

    3) I entered into the Valid OAuth redirect URIs:

    http://localhost/myappfolder/redirect.php
    

    4) regarding my code, insdie my c:/xampp/htdocs/localhost/myappfolder/index.php (this file makes the loginURL):

    $helper = new FacebookRedirectLoginHelper('http://localhost/myappfolder/redirect.php');  
    

    inside the redirect.php file:

    $helper = new FacebookRedirectLoginHelper('http://localhost/myappfolder/redirect.php');  
    

    and I got a session! finally! no need to hang myself in the end :P

提交回复
热议问题