0
votes

This related question and its answers explain what a Facebook share links should look like:

http://www.facebook.com/sharer/sharer.php?u=#url

But when the user is not currently logged in to Facebook when he clicks this link, the url to share has been replaced by the URL of the FB login page:

enter image description here

Sorry, I don't know how to make FB show this in English, but you can see in the naviagtion bar that the value for u has been lost after login and now reads ...?u&ret=login instead of ...?u#url&ret=login.

You can try this yourself by logging out of Facebook and following this link: http://www.facebook.com/sharer/sharer.php?u=#http%3A%2F%2Fstackoverflow.com%2Fquestions%2F29557906%2Ffacebook-share-link-does-not-remember-the-url-to-share

How can I force Facebook to "remember" which URL to share?

I would prefer to avoid using JavaScript (but will do, if necessary), and I don't want to register a Facebook app to use the share dialog.

2

2 Answers

0
votes

if i understand you want to share something on someone facebook wall without using any facebook api ?

For what i know you can't. The post you are referring to is 3 years old, and not accurate anymore.

0
votes

But when the user is not currently logged in to Facebook […]

It doesn’t work when they are logged in to Facebook either (then it just shows a field to input a URL to share first) – and that’s because you did not pass any value for the u parameter, but ended the query string after ?u= by using the # sign, which of course starts the hash part of a URL, and that does not even get send to the server …

Remove the # – the correct link is http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F29557906%2Ffacebook-share-link-does-not-remember-the-url-to-share