Using hash tags with Facebook share possible?

前端 未结 2 629
我寻月下人不归
我寻月下人不归 2020-12-19 08:26

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

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 09:12

    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.

提交回复
热议问题