Facebook的OG被重定向到BackboneJS网站的索引页 [英] Facebook OG gets redirected to the index page by BackboneJS website

查看:327
本文介绍了Facebook的OG被重定向到BackboneJS网站的索引页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用BackboneJS创建了一个网站,我想实现的Facebook OG,这样当用户从Facebook状态贴我的网站的网址,它会显示标题,图像等。

I have a website that is created using BackboneJS and I am trying to implement Facebook OG so that when user pastes my site's URL from the Facebook status, it will display the title, images and etc.

我的问题是,FB刮刀越来越总是重定向到适当的索引页阿帕奇所有流量重定向到索引页面,让BB路由器可以正常工作。它只能看到标题OG,OG的图像等,这是对的索引页,而不是我的其他网页。

My problem is that the FB scraper is getting redirected always to the index page due that Apache redirects all traffic to the index page so BB router can work properly. It only sees the og title, og image and etc that was for the index page and not on my other page.

Facebook的刮板/履带似乎并没有通过BB路由器走了。它只是呈现静态index.html页面。

Facebook scraper/crawler does not seem to be going through the BB router. It just renders the static index.html page.

有没有人有这一个一个解决方法/解决方案?

Has anyone got a workaround/solution for this one?

推荐答案

您可以使用Facebook的皮棉工具来调试OG对象,这里是您的域名链接:

You can use Facebook Lint tool to debug OG objects, here it is on one of your domain links:

<一个href=\"http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fembedible.com%2Fvideo%2FamQ1Njg4QGdtYWlsLmNvbTI5OA%3D%3D\" rel=\"nofollow\">http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fembedible.com%2Fvideo%2FamQ1Njg4QGdtYWlsLmNvbTI5OA%3D%3D

这是你有问题与OG注意:URL显示 http://embedible.com/ 虽然贵OG对象URL实际上是 http://embedible.com/video/amQ1Njg4QGdtYWlsLmNvbTI5OA==

Notice that you have a problem with the og:url that shows http://embedible.com/ although your OG object url is actually http://embedible.com/video/amQ1Njg4QGdtYWlsLmNvbTI5OA==

你可以看到它的重定向路径皮棉调试器的部分,被报废的实际URL是 http://embedible.com/

you can see it on the Redirect Path section of the lint debugger, the actual url that was scrapped is http://embedible.com/

在我的网站上,我们渲染根据网址不同的数据相同的HTML模板。所以,我有2模板引擎之一在客户机上的真实想法和一个充满meta标签在服务器上

On my website we render the same html template with different data based on the url. So I have 2 template engines one for real views on the client and one on the server that fill the meta tags

底线:必须更换服务器上的meta标签

Bottom line: you must replace the meta tags on your Server.

这篇关于Facebook的OG被重定向到BackboneJS网站的索引页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆