Share on facebook without fbconnect: fb sharer

The intro:
Let’s say you do not want to incorporate the whole facebook connect as3 lib (check my excellent copy of an excellent post by Steven Van Hissenhoven) in your flash project but do want people to interact with facebook through your website.

For instance, by posting pictures or generated images from within flash. Totally doable and easy, even! Just use facebooks sharer page!


The (javascript) code:
First you need a javascript function that can trigger the sharer. I always go for a popup, but you can ofcourse open the sharer anyway you want. A fairly easy to understand javascript snippet I made that looks like this should be pumped somewhere in your html:

function facebookme(pictid){
	url = "http://www.your-url-here.com/images/" + pictid;
	title = "Add a picture to facebook!";
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');
}


This function can be addressed out of flash by the External Interface class and expects a pictid, basically the name of the image you want to share on facebook. This can be a generated image or one already on the server. Like I said: the function is pretty simple: it only expects an image and will open a sharer popup that will show you the image and the page title.

Now, let’s assume you want to have a description. A little more tricky, but still quite easy: Facebook has certain meta tags that you can use to populate the sharer. It will automatically pick these things up if they are present in your html page:

<meta name="title" content="Your page title here." />
<meta name="description" content="A description here. Can be quite long even and will appear under the title next to the picture if provided." />
<link rel="image_src" href="thumbnail_image" / >


This works great and could be a nice add-on for your website that on top of that is supereasy to do and requires no facebook connect api knowledge at all. All you need to do now is the flash part which is even more easy!


the (flash) code:

import flash.external.ExternalInterface;
 
ExternalInterface.call("facebookme", picture_path_here);


“facebookme” is the name of our javascript function we placed in the html. “picture_path_here” is a variable that holds something like “2.jpg” (or the full url to the image, but then be sure to change the javascript function!). Also don’t forget to import the ExternalInterface class which can be found in the “external” package.


The outro:
Boom, that’s it. It’s a nice step to loads more posts about facebook and flash even if I say so myself. Now go forth once again, young flash vampires!

Steven Van Hissenhoven, as3 and facebook connect

A few weeks ago adobe anounced a new ActionScript 3 Library for the Facebook API (www.adobe.com/go/facebook). Facebook and flash are two ever growing platforms and combined could make even more awesome projects so naturally Murten Saerbi went on a mission to find a client/test project to use these two puppies together.

While doing the project I kept thinking about a quick how-to to further explain how it all works.

Constantly delaying this however, made sure somebody beat me to it. Be sure to check out the magnificent post Adobe Flash & Facebook Connect by Steven Van Hissenhoven. You can download the source code and view an example, I barely would have done it better myself! He even made a header about it which is a solid idea and a quick and easy test to… well… test it out.

Go forth, my flash-meets-facebook connect ninjas!

Murten is back!

I’ve been back for a while already actually, but… euhm… yeah!

I am seriously going to post some new stuff – not only saying this but actually doing it! – soon but I’ve been fairly busy doing all sorts of crazy stuff. Keep checking the site because I promise it will be worth it. Seriously!

In other unrelated news: I am on Twitter! I don’t know how much I will tweet and I don’t even know why I tweet but my last tweet dated from 2007 so I thought it was time to tweet again.

PS: who the hell invented “tweet”. Was it you, @TomAnthoni?

Murten Saerbi is off to Spain!

I’m off to Spain for now. Questions that will rise will probably be about the swfaddress example I just posted and I will answer them as soon as I get back. If you have any other questions: email / comment / post / whatever them, I will read them in about 12 days.

After I get back I will launch my own website and post alot more snippets and projects I have been working on.

Stay tuned and always remember: disco lives in our hearts forever.

Murten does jtevents.be!

We at Murten Saerbi encourage young entrepeneurs to start their own business and are more than happy to help out with a website. JT events will bring Ibiza-styled parties to Belgium starting with their first concept called “Sunrise Clubbin”.

JT events screenshot

Check it out over at jtevents.be.

Accessibility in a website: the infobox

We all like stuff that works and is easy to handle with. I would like to take this even further and add that we all like stuff that is dummy proof. Whether you really are a dummy or simply to lazy to read the manual: stuff needs to work the way you expect it to work.

That’s why I am an avid fan of the infobox. Not only is it a cool extra feature, it really adds an extra value to a website.

For those who don’t know it, it basically is a little box that pops up with some more info about the matter. You can design it any way you want and make it popup whenever you want but the most logical time to make it pop up is when people do something wrong (incorrect emailadress) or may need some more info (specific vocabulary or a new technique).

For those of you “I-don’t-need-no-infobox sayers” I certainly agree that not every website needs infoboxes but the reason that I make this post is to point out that such an easy-to-make feature can really add an extra value to a website. Maybe some examples can turn you no-sayers over:

example 1:

infoblock example 1

It shows a simple and straightforward message that tells you what went wrong. Ofcourse you could have made the inputfield light up a bit to attract attention but the subscribe box is in a place that isn’t really in the normal field of vision and already pretty small (so a red star or a blinking field would be even smaller). This way everybody that wants to subscribe will really be subscribed.

example 2:

infoblock example 2

Here the infobox comes in the form of a friendly seacreature that also serves as a guide through the website. The website is ment for kids and with the help of Crabby McInfobox they can’t really do anything wrong. It explains, it corrects, it verifies, basically it’s awesome!

Murten teases Singers & Swingers!

Check it out at singersandswingers.be!

Murten Saerbi goes freelance!

As the title says: I started working for myself! Hooray!

What does this mean for you guys? Only positive stuff! My blog will still be about the flash platform and the things that I create/design but just to keep it all well and organized I have decided to divide the blog in two main categories:

- snippets: actionscript tips and tricks or solutions to problems I run into.
- showroom: the work that Murten Saerbi does.

Everything else will fall under “uncategorized” but I will try and keep this to a minimum.

If you have questions, comments or perhaps want to hire my services please don’t hesitate to contact me at him@murtensaerbi.be.

Thanks in advance,

Murten Saerbi

Shameless friend plugin

I would like you guys and girls to take a moment and check out a blog of a former collegue of mine: Bart “Arcko Drazen” Claessens.

Not only well on his way to become almost as good as me (don’t worry, I said almost) in actionscript, he also dares to take a stab at various other topics of the multimedia world. It’s even interesting at some points!

Soooo.. what I am trying to say here: if you could make some time in your busy shedule trying to keep up with me it would be cool to check out Arcko Drazen over at randomize everything.

Murten does Cirque Belge!

Cirque Belge screenshot

CB preview

CB preview 2

Check it out at cirquebelge.com!

On a totally different note: A good friend of mine named Lyndsay Meager turned my badge design in actual badges so I can promote my new website! (so new it’s not even here yet!)

Stick ‘em everywhere, world domination is just a glimpse away!

badge example 1

badge example 2



Last but not least I wanted to show you guys and girls a sneak preview of a poster I’m working on named Jessie’s Girl. Soon this and other works of mine will be published in a shiny new magenta design book. Exciting, huh?

Jessie's girl preview