简体   繁体   English

重命名Facebook应用程序的托管URL

[英]Renaming the Hosting URL for a Facebook App

I just started developing a Facebook App. 我刚刚开始开发Facebook应用程序。 I'm having trouble understanding some things working with Heroku, the free hosting platform for the apps. 我无法理解与Heroku(适用于该应用程序的免费托管平台)一起使用的某些事项。

So I created the App on Facebook. 因此,我在Facebook上创建了该应用程序。 And from Heroku, I renamed the App. 从Heroku,我将其重命名为App。 And from Facebook under App on Facebook, I changed Canvas URL and Secure Canvas URL accordingly. 从Facebook上的App下的Facebook中,我相应地更改了Canvas URLSecure Canvas URL But the Hosting URL still has the old URL which was given when I created the app. 但是托管URL仍然具有我创建应用程序时给出的旧URL。 The only option given is to remove it. 给出的唯一选项是将其删除。 How can I edit this and give the new URL? 如何编辑它并提供新的URL?

Guidance would be greatly appreciated as I'm really confused with this. 指导将不胜感激,因为我对此感到非常困惑。 Thank you. 谢谢。

Yes, I'm same problem like you. 是的,我和你一样都是同样的问题。

The reason why removing Hosting URL is I don't want auto-generated url something like 'something-####.herokuapp.com' 删除托管网址的原因是我不希望自动生成类似“ something-#####。herokuapp.com”的网址

When I removed this url, however, Facebook authentication doesn't work anymore. 但是,当我删除此URL时,Facebook身份验证不再起作用。 So my recipe is, 所以我的食谱是

  • Change app name whatever you want. 随时更改应用名称。
  • Just remove it hostring url. 只需删除它的托管网址。
  • Reconfigure heroku's config var using CLI. 使用CLI重新配置heroku的config var。

    $heroku config:add FACEBOOK_APP_ID=yours FACEBOOK_SECRET=yours

You can figure it out heroku config -s current variables. 您可以找出heroku config -s当前变量。 Check Readme.md in your Facebook/Heroku sample app folder for more detail. 在您的Facebook / Heroku示例应用程序文件夹中检查Readme.md以获取更多详细信息。

I actually had a similar issue when I decided to change the app name on heroku. 当我决定在heroku上更改应用程序名称时,我实际上遇到了类似的问题。 After a little bit of research I realized that if toy only change the items it allows you to change, facebook will still direct to your heroku app page. 经过一番研究,我意识到,如果玩具仅更改其允许您更改的项目,facebook仍将直接转到您的heroku应用程序页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM