Facebook Share button returning error

那年仲夏 提交于 2019-12-21 20:42:42

问题


Example url:

http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan&src=sp

That's what's generated by the Share JS. If you visit the link (after decoding):

[...].com/2011/09/2124/rugby-world-cup-daily-tonga-beat-japan

You can view source and see open graph meta tags.

If the share url is changed to:

[...].com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan2&src=sp

(Adding a 2 to the end of the url) the result is fine. Likewise with other posts:

http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2119%2Frugby-world-cup-daily-christchurch-revisted&src=sp

So all I'm getting is "Error" with no way of knowing what went wrong.

Any insight would be great. A thought was that the url was flagged or banned by FB but no way to tell.

[...] is used cause I can't use more than 2 urls.


回答1:


I re-linted your URL in the Facebook developer debug page:

http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan%2F

and it appears to work fine now. Facebook caches the data obtained from a page, so it's likely they hit your page during a period in which it had an error message instead of the usual contents.



来源:https://stackoverflow.com/questions/7508823/facebook-share-button-returning-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!