Updating facebook status with message from a Javascript variable

user246748 picture user246748 · Jan 8, 2010 · Viewed 9.7k times · Source

Is there an easy way to let users update their status on Facebook with a message I have in a JavaScript variable? I know there's a URL you can use to share a link, which looks like:

<a href="http://www.facebook.com/sharer.php?u=www.fthisclass.com/jshoregen.html&t=title">testlink </a>

That doesn't fill in a status update when it takes them to the share page. Is there a way I can have that pre-filled, or have their status automatically updated?

Thanks!

Edit: Not quite what I'm going for. I can use PHP if necessary (although I have very little experience with it), but I don't want to have to bug users with allowing an application, or have to deal with actually writing a facebook app. I just want to give users a premade status update, so all they have to do is click the 'share' button. Thanks again!

Edit 2: So the api looks promising, but a little complicated for me. It looks like it would involve getting permission from the user to set their status, and possibly something about setting up a cross-communications channel to let my site communicate with facebooks. Assuming I can do that, how do I go about using the Facebook Javascript api? I get the code (user_setStatus looks easy enough), but how do I tell my script that I'm using Facebook's api? Thanks again...again!

Answer

mcqwerty picture mcqwerty · Jan 12, 2010

Try this:

http://www.facebook.com/connect/prompt_feed.php?&message=my%20awesome%20status

[EDIT] Link is not working please update it.