Setting Facebook Status with Flash (The Easy Way)

Feature image

Update: As of June 8, 2011, it appears Facebook has killed this functionality. Adina posted a comment below with a link to Facebook's Feed dialog documentation: https://developers.facebook.com/docs/reference/dialogs/feed/. It's got everything you need to do this there. I'll eventually update this post to reflect these docs. Update #2: As of July 5, 2011, it appears the method I talked about in this post is working again. Just as Facebook killed it once though, they may do it again, for now though, it looks like it's working.

If you read my previous post on setting Twitter status using Flash, you?re going to have some déjà vu with this post. The easy Facebook method (as apposed to the more involved method, which we?ll cover in a future post) is nearly identical to way we updated Twitter status. In that light, I?m not going to cover any of the previous details, like how the error message is displayed and why we?re using a drop down. It?s all covered in the Twitter post though.

The Flash version in action

Let?s take a look at what the Flash piece does. The user selects a phrase from the drop down menu then can preview the resulting message in their Facebook status box. (If they are not logged into Facebook, they are prompted to log in first.) Try it out. If you actually post a status update to your Facebook page about reading SuperGeekery, you are a geek and I appreciate it. You can also download the source files here.

The Flash movie can't be displayed on your device.

What's the deal? If you're reading SuperGeekery, you know your way around a Flash plugin. You've probably got Flash turned off, uninstalled, or maybe you don't have JavaScript turned on. Whatever the case may be, you can see the Flash movie. Go jump on a computer with those things and we're in business again.

The Magic URL

I said this is going to be easy though, and it is as long as you know the magic URL from Facebook. To pre-populate the status field in Facebook for someone, you add a URLEncoded string to a special URL For example:

http://www.facebook.com/connect/prompt_feed.php?&message=Your%20message%20goes%20here.

Try this URL directly in a browser. Cut and paste that URL into a new browser window. You will see a Facebook status window prompting you to post ?Your message goes here.? That?s a pretty lame default message, but you can see the possibilities. You can now use Flash, or any other method, like JavaScript or even a static link, to pre-populate a Facebook status message.

If downloaded the source files you can start to pick apart the Flash movie and customize it.

What's missing?

So this was pretty easy, but you might notice that it's missing some of the bells and whistles that Facebook allows. For example, you didn't get a chance to show a custom image next to your post or have a headline, subhead or custom links attached to this status update. This isn't included in the easy method unfortunately. We'll cover that soon though, so stay tuned. (UPDATE: The 'hard' way is now live as well. Read Setting Facebook Status with Flash (The Hard Way) for more info.

Comments on this post.

unfortunately trying this in FF causes FF to go mad shrinking and expanding itself

By guy on Oct 10 2010

Hi Guy,

I think what you’re seeing is because Firefox is opening the window in a new tab. Does that sound right? The way around this is to not try resizing the window in the FLA.

In the code that opens the window, you’ll see I’ve set it to resize the window:

if (ExternalInterface.available) {
08
      ExternalInterface.call(“window.open”, theURLtoCall, “win”, “height=500,width=850,toolbar=no,scrollbars=yes”); }
09
  }

If you don’t have the height and width set, does the problem go away for you?

By John Morton on Oct 12 2010

Thanks for sharing! Did you ever post the method with the “bells and whistles”? Would be interested in learning that.

By lina on Feb 22 2011

I’ve finished the “hard way” post finally. It took longer that I expected. (It was the hard way, right?) Check it out here: http://supergeekery.com/geekblog/comments/setting_facebook_status_with_flash_the_hard_way/

By John Morton on Mar 21 2011

How would you handle french characters using this setup?

By Stuart on Apr 07 2011

Stuart,

How is it not working with French characters?

-John

By John Morton on Apr 13 2011

Hi there - have you noticed this doesn’t work anymore? Any idea how to fix?

Thanks!

By Catherine on Jun 08 2011

Hi Catherine,

I used it probably less than a month ago and it work. I don’t know exactly what’s changed, but I know Facebook has been pushing the Like button very hard on developers. It’s too bad, this solution was a nice easy solution.

At this point, the “hard way” post is your next best option that I know of with doing this with Flash. If I find another easy solution I’ll add it here too.

-John

By John Morton on Jun 08 2011

Thanks for the quick reply John! I had been using it for a while now too with no problems ... too bad the “hard way” is so much harder.

Appreciate your help!

By Catherine on Jun 08 2011

Try the Facebook Feed dialog:
https://developers.facebook.com/docs/reference/dialogs/feed/

By Adina on Jun 08 2011

Thanks Adina - worked wonderfully!

By Catherine on Jun 08 2011

Adina,

That’s great. I will update this post with that soon. Thanks much for sharing.

By John Morton on Jun 09 2011

Hi all,i need this code in AS2 version,can you help me?

By kswarulez on Jun 29 2011

kswarulez,

Check out the link Adina mentioned above, https://developers.facebook.com/docs/reference/dialogs/feed/. This should get you on the way. I will eventually rewrite this tutorial. Time is just the issue at the moment. Good luck.

-John

By John Morton on Jun 29 2011

I’ve added a post that shows how to use the new method that Facebook has provided when they deprecated the ‘prompt_feed’ method. Check is out here: Setting Facebook Status with Flash - Version 3 http://supergeekery.com/geekblog/comments/setting_facebook_status_with_flash_version_3

By John Morton on Jul 19 2011

When I go to: http://www.facebook.com/connect/prompt_feed.php?&message=Your message goes here. i can see the page, but the message doesn’t populate in the text area =( is there something I’m doing wrong?

By James on Nov 17 2011

James, unfortunately Facebook has now shut off this feature, so it doesn’t work anymore. It was useful, but just not possible anymore. :/

By John Morton on Nov 17 2011

Thanks for the quick response.  That’s lame, that was a pretty nice feature.  My dilema now is, i have a video player that will be on multiple sites and i want to put a facebook button on the player so people can update their pages with a url to the player.  But how will that work if I have an api key? I couldn’t set it up that way, is that correct?

By James on Nov 17 2011

If you had an API key, I think your app would be tied to a single domain, at least for the redirect URI. Even then, you wouldn’t be able to prefill the user’s status message and stay within the developer’s rule, if I remember correctly.

https://developers.facebook.com/docs/reference/dialogs

One possible solution is to have your app live on different sites and always call back to the same redirect uri though. It would require some experimentation to see if that might work, but I’m skeptical of that even.

By John Morton on Nov 17 2011

Leave Your Comment:

name:

email:

location:

url:

your comment:

Remember my personal information

Notify me of follow-up comments?

Twitter Feed

John Morton talking on Twitter




Meanwhile on Instagram… //

My latest shot from Instagram.
#nyc