开发者

Different domain for Facebook login

开发者 https://www.devze.com 2023-04-02 02:51 出处:网络
In my facebook app I need to authenticate users on a different domain (not facebo开发者_运维百科ok.com), for example xxx.facebook.com, is it possible?Yes, it is possible, only IF facebook endorse it.

In my facebook app I need to authenticate users on a different domain (not facebo开发者_运维百科ok.com), for example xxx.facebook.com, is it possible?


Yes, it is possible, only IF facebook endorse it. For example when we log in the Developers.facebook.com. Each domain is a child of facebook which mean that you need to have approval by Facebook to create a sub-domain.(well you won't create it but they will)

a little bit of search in the dev section resulted in this,

User authentication and app authorization are handled at the same time by redirecting the user to our OAuth Dialog. When invoking this dialog, you must pass in your app id that is generated when you create your application in our Developer App (the client_id parameter) and the URL that the user's browser will be redirected back to once app authorization is completed (the redirect_uri parameter). The redirect_uri must be within the same domain as the Site URL you specify in Web site tab of the Developer App:

https://www.facebook.com/dialog/oauth? client_id=YOUR_APP_ID&redirect_uri=YOUR_URL

If the user is already logged in, we validate the login cookie that we have stored on the user's browser, authenticating the user. If the user is not logged in, they are prompted to enter their credentials:

Hope this help

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号