如何在 rails 中呈现 facebook 页面

how to render a facebook page in view in rails

rails 中是否有任何进程可以让我在本地应用程序页面上初始化远程站点网页。我想通过 <% render "https://www.google.co.in" %> 获取远程网页,例如 google 主页 https://www.google.com 这是一个要求,只是因为当我在另一个控制器中呈现页面时,我遇到了错误,我试图解决它更多但现在由于时间我应该更喜欢这个

在本地应用程序上拥有远程站点网页的唯一方法是使用 <iframe></iframe> 标签。使用 'render' 将不起作用。您可以查看文档 here.

你的情况是:<iframe src="http://www.example.com"></iframe>

请记住,您不能使用 www.google.co.in,因为 Google 的安全政策阻止您这样做(其他一些网站也这样做,但不多)。请参阅 this question 了解为什么不能在 iframe 中使用 google。

希望对您有所帮助!