Facebook图形API可以区分website.com/?source=text与website.com/#fragment的共享计数吗?

时间:2015-02-10 19:50:41

标签: facebook facebook-graph-api

1 个答案:

答案 0 :(得分:1)

是的,你可以 - 假设你代替www.google.com谈论你控制的网站。此外,假设通过更改作为url一部分的查询字符串实际上会更改用户看到的页面。

执行此操作的方法是根据网址更改HTML中呈现的元标记。因此,如果用户使用url转到页面:

  

http://www.myUrl.com

那么元标记可能就像

<meta property="og:title" content="Workday Sets Price Range for I.P.O." />
<meta property="og:url" content="www.myUrl.com" />
// there are more then just these look up Facebook Docs

然后用户去了:

  

http://www.myUrl.com?q=blah&a=blah

你会从你的服务器呈现不同的元标记,Facebook会读取这些并知道它们应该是不同的页面

<meta property="og:title" content="DIffernt title here" />
<meta property="og:url" content="www.myUrl.com/blahhblooblah" />
// there are more then just these look up Facebook Docs

当你完成后,你应该使用所有这些元标记

  • OG:标题
  • OG:SITE_NAME
  • og:url
  • og:description
  • og:image
  • FB:APP_ID