【发布时间】:2014-04-04 19:46:06
【问题描述】:
<meta property="og:url" content="http://localhost:8821/EventRegister.aspx" />
<meta property="og:title" content="Welcome and Share Test" />
<meta property="og:description" content="Hope it worked!!!!!!!" />
我正在开发一个 asp.net 项目,并想在其中放置一个 facebook 分享按钮。我在 head /head 部分编写了该代码,然后启动了调试模式并尝试了链接: https://www.facebook.com/sharer/sharer.php?u=http://localhost:8821/EventRegister.aspx
但我得到的只是一个没有标题或描述的空共享页面,只有描述中的 localhost 链接。
我怎样才能让它工作?我想要可自定义的标题、图像、描述,就像上面的代码一样。找了2天没停。
谢谢...
--
更新:
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=sfgsfgsfg&p[summary]=sdgsdgsdg&p[url]=http://localhost:8821/EventRegister.aspx','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)">Click to share.</a>
这样做了,结果还是一样:(
【问题讨论】:
-
不管我怎么改都行不通……
-
我认为它不能在 localhost 上运行,所以我需要让我的项目在线使用 facebook 进行测试。