简体   繁体   中英

Share a link with hash on Facebook sharer not possible

I need to share a link on Facebook, the link is like below:

http://mydomain.com/mypath#photos:para=a&para2=b

but without luck, the result is: http://mydomain.com/mypath which is not what I want, I try below link:

Using hash tags with Facebook share possible?

to replace the # with %23 but then it gives me: http://127.0.0.1/mypath?photos%3Apara=a which is obvious wrong.

Any idea about this? Thanks in advance.

BTW the facebook sharer link is:

https://www.facebook.com/sharer/sharer.php?u={0}

Facebook wont crawl the Javascript.

But as Facebook take the og tag into the account.

So you need to create pages alike your hash pages with different URL.

May be http://mydomain.com/mypath?para=a&para2=b

for : http://mydomain.com/mypath#photos:para=a&para2=b

And place only og metas in there, and redirect the page with Javascript. You may also put same data as in the hash page.

So Facebook will read the og tags. And if the link is clicked on Facebook than it will redirect after page load.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM