How to write a channel.html file in Rails (for Facebook)

前端 未结 4 2058
醉梦人生
醉梦人生 2021-02-08 22:57

According to the FB SDK I must include a channel file with the appropriate headers.

Being a major NOOB and a Rails not PHP developer I have no idea how to do this.

4条回答
  •  再見小時候
    2021-02-08 23:38

    I got tired of polluting my routes.rb file in every facebook connected app so I wrapped a rack handler that gives the correct channel.html response in a Rails Engine and published it as a gem. You can simply include the 'fb-channel-file' gem in your Gemfile and it will be automatically mounted at /channel.html https://github.com/peterlind/fb-channel-file

提交回复
热议问题