像几乎相同的URL(HTTP,HTTPS) [英] Like count for almost same URL (HTTP, HTTPS)

查看:132
本文介绍了像几乎相同的URL(HTTP,HTTPS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序的每一页都设置为按钮。但是Facebook有两种模式:查看页面:不安全的(HTTP)和安全的(HTTSP),所以我应该如何在fb中执行代码href:以便显示http和https上的同一页面应该像Facebook一样按照SAME页面?据了解,像使用URL路径作为uniq ID,所以在fb:like标签我现在写的 http://路径或< a href =https:// path =nofollow> https://路径取决于用户在我的页面上使用的协议,所以正式地是两个不同的页面,并且每个页面我想。如何在http路径和https路径summiraze上进行计数,并在两个页面上显示相同的计数?或者可能是Facebook alredy解决这个问题,我应该担心这个吗?



和类似的问题我的应用程序是avalable的直接url(mysite /路径),所以我想要喜欢从这样的URL也可以像同样的页面一样,但从路径apps.facebook.com/myapp/path。我该怎么办?刚才我写了一个像标签路径apps.facebook.com/myapp/path的href,即使它是通过直接URL访问的。是否有更好的决定让喜欢的实际数量从不同的条目到应用程序?

解决方案

只需放置页面的http url无论用户使用的协议如何。
没有理由在fb:like按钮中使用https,因为它没有被加载。



另一件事是在打开的图标元标签中url param(og:url)总是放置http版本。



没有问题,将fb画布页面的url放在像 url,虽然我认为我会做相反的方式,在画布页面里面的fb我将使用直接url在类似的按钮。


I set like button on every page of my app. But facebook has two modes o viewing pages: unsecured (HTTP) and secured (HTTSP), so how should I do code href in fb:like to show that the same page on http and https should be count by facebook like as rely SAME page? As far as understand facebook like use URL path as uniq ID, so in fb:like tag I write now http://path or https://path depends on protocol that user use coming on my page, so formally this is two different page and facebook count would different for every page I suppose. How can I make count on http path and https path summiraze and show on both page the same like count? Or may be Facebook alredy solve this problem and I should be worried by this?

And similar question my app is avalable by direct url (mysite/path) so I want likes from such url also count as likes on the same pages but get from path apps.facebook.com/myapp/path. how could I do this? Just now I write in href of like tag path apps.facebook.com/myapp/path even if it accessed by direct URL. Is it corret decision to have solid count of likes get from diffrent entries to app?

解决方案

Just put the http url of the page regardless of the protocol the user is using. There's no reason to use https in the fb:like button since it's not being loaded anyway.

Another thing is that in the open graph meta tags, under the url param (og:url) put the http version always.

There's no problem to put the url of the fb canvas page in like button you have in the "direct url", though I think that I would do it the other way around, in the canvas page inside fb I would use the direct url in the like button.

这篇关于像几乎相同的URL(HTTP,HTTPS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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