简体   繁体   English

结合来自url.com和www.url.com的喜欢

[英]Combining likes from url.com and www.url.com

At a website of ours, we've had a normal FB like button and gathered some likes. 在我们网站上,我们有一个普通的FB like按钮并收集了一些喜欢的东西。 After a while we realised we would like to be able to post to people liking our site. 一段时间后,我们意识到我们希望能够向喜欢我们网站的人发布信息。 I created an app and added the fb:app_id meta tag and the app started gathering the likes rightaway. 我创建了一个应用,并添加了fb:app_id元标记,该应用立即开始收集喜欢的内容。 However, the likes we had from before are not counted in the app although they are still shown in the number by our like button. 但是,虽然我们的“赞”按钮仍会在数字中显示这些赞,但我们之前未曾赞过的赞并未计入应用。

Have a look at https://graph.facebook.com/?ids=http://leveransrapport.se compared to https://graph.facebook.com/?ids=http://www.leveransrapport.se . https://graph.facebook.com/?ids=http://www.leveransrapport.se相比,看看https://graph.facebook.com/?ids=http://leveransrapport.se The first one shows 105 shares whereas the second one shows 10 likes. 第一个显示105个份额,第二个显示10个赞。

What am I missing? 我想念什么?

My intention is to get all the likes to show up in the app page for the admins. 我的意图是让所有喜欢的内容显示在管理员的应用程序页面上。

I think the issue goes beyond Facebook. 我认为问题超出了Facebook。 This is known as the canonical problem and causes search engines to treat the URLs as different and split search ranking! 这被称为规范问题,导致搜索引擎将这些URL视为不同的搜索排名!

Ideally you want all URLs to map to one of the two (www. or non-www.) to prevent this kind of problem. 理想情况下,您希望所有URL都映射到两个网址之一(www。或非www。),以防止出现此类问题。

You could put something like this in your .htaccess file (google shows you more examples) 您可以在.htaccess文件中放入类似的内容(Google向您显示了更多示例)

RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/ $1 [R=301,L] RewriteCond上的RewriteEngine%{HTTP_HOST} ^ domain.com $ [NC] RewriteRule ^(。*)$ http://www.domain.com/ $ 1 [R = 301,L]

Many browsers appends http to url without protocol so that url.com will become http://url.com and www.url.com will become http://www.url.com . 许多浏览器在没有协议的情况下将http附加到url,因此url.com将变为http://url.com,而www.url.com将变为http://www.url.com It depends on how the app treats urls. 这取决于应用程序如何处理网址。 Since I have not programmed with FB API I cannot add much than general information 由于我尚未使用FB API进行编程,因此我只能添加比常规信息更多的信息

Edit: 编辑:

According to this link and some on internet the two makes no difference and it is a matter of preference> I think you have to check if the links is not supposed to be https not http! 根据此链接以及互联网上的某些链接 ,两者没有什么区别,这是一个优先选择的问题。>我认为您必须检查链接是否不应该是https而不是http!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel-Azure DNS-网站网址问题(url.com有效,www.url.com无效) - Laravel - Azure DNS - Website url issues (url.com works , www.url.com does not) 使用htaccess将www.url.com/x=y重定向到www.url.com/file.php?x=y? - Redirect www.url.com/x=y to www.url.com/file.php?x=y with htaccess? url.com?somephpcode是否容易受到我代码中的任何攻击? - Is url.com?somephpcode vulnerable to anything from my code? 使用CURL进行下载而无需直接路径| www.url.com/things?download=文件 - Using CURL to download without a direct path | www.url.com/things?download=file 直接用户访问url.com/page的URL从URL选择div# - Direct user to url.com/page have url select div # from URL 如何在Javascript代码示例中使用变量:src =“ htp://www.url.com/file.php?id = [3434]” - How To Use Variable In Javascript Code Ex: src=“htp://www.url.com/file.php?id=[3434]” 转到具有我选择的下拉值的URL(url.com/dropdownvalue1+dropdownvalue2+etc) - Go to URL with dropdown values I select (url.com/dropdownvalue1+dropdownvalue2+etc) .htaccess将url.com/file.php?=$terms重定向到newurl.com/search.php?= $ terms(如果引荐来源网址不是site.com) - .htaccess redirect url.com/file.php?=$terms to newurl.com/search.php?=$terms if referrer is not site.com 该页面不工作。 url.com 目前无法处理此请求。 HTTP 错误 500 - The page isn't working. url.com is currently unable to handle this request. HTTP ERROR 500 正则表达式:从URL检索www之间的所有内容。 和.com - Regex: retrieve from URL everything between www. and .com
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM