I just dealt with this myself, and here's the part that bit me:
In your step 5... It's possible for a user to register for an account with you entirely separate from their Facebook ID, right? Then some other time they log in with Facebook.... And you just created them a second account and lost their first one.
There needs to be a way to be logged in to your web service, then log in to facebook, and capture the association between the facebook ID and the local account.
Apart from that, your plan sounds solid.
Update: Facebook has added a doc outlining such a scenario HERE
The facebook javascript API allows you to share and gives you a callback
http://developers.facebook.com/docs/reference/javascript/FB.ui/
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
message: 'Facebook Dialogs are easy!'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
To use this you need to have set up a facebook application and put the following code directly after the opening body tag
<div id="fb-root">
</div>
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
<script type="text/javascript">
FB.init({
appId: YOUR_API_KEY,
status: true,
cookie: true,
xfbml: true
});
FB.Canvas.setAutoResize();
</script>
If you ask for basic permissions, you could then get the users facebook id and use this to store which users had shared.
Best Answer
You could use
Currently there is no sharing option without passing current url as a parameter. You can use an indirect way to achieve this.
Example ASP .Net code: