使用散列标签与Facebook分享可能吗? [英] Using hash tags with Facebook share possible?

查看:190
本文介绍了使用散列标签与Facebook分享可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于ajax的网站,我想在加载的内容中添加一个FB共享功能。链接使用哈希标签,当我使用共享功能时,我无法得到完整的链接显示,我只得到域网址。哈希标记是不允许的,还是有一种特殊的方式共享这样的链接?

解决方案

使用URL编码为字符。只需更换以下内容:

  http://www.example.com/#/path/to/whatever/ 

与:

  http://www.example.com/%23/path/to/whatever/ 

这将允许您通过在Facebook,Twitter等上分享,而不会被剥夺。


I'm developing an ajax based web site and I want to include a FB share function on the loaded content. The links use a hash tag and I can't manage to get the full links to show up when using the share function, I only get the domain url. Are hash tags not allowed or is there a special method for sharing such links?

解决方案

Use URL Encoding for the # character. Just replace the following:

http://www.example.com/#/path/to/whatever/

with:

http://www.example.com/%23/path/to/whatever/

This will allow you to pass the # to share on Facebook, Twitter, etc without getting stripped.

这篇关于使用散列标签与Facebook分享可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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