MASH for Facebook

MASH for Facebook - our first HAXE release! Pretty simple game but has some fun elements like parallax scrolling, Facebook integration and custom particle engine. This is just a beta for now but we should be releasing the full blown version here shortly. …

Viewing 1 to 7 (7 Total)
MASH for Facebook

mourlamstudios

mourlamstudios
Total Posts: 152
Joined: February 12, 2012

MASH for Facebook - our first HAXE release! Pretty simple game but has some fun elements like parallax scrolling, Facebook integration and custom particle engine. This is just a beta for now but we should be releasing the full blown version here shortly. Dev time was ~2 week in our very (*emphasis on very) spare time so we're very pleased with the turnout. Needless to say we love HAXE!!

Check it out and let us know what you think!

http://apps.facebook.com/mashthegame...

Tags:
Attachments: nme-mash-haxe.jpg
Posted on February 21, 2012 at 8:29 AM

mourlamstudios

mourlamstudios
Total Posts: 152
Joined: February 12, 2012

Re: MASH for Facebook

Whoops. We had a Facebook redirect issue which prevented IE, Chrome and FF users from authenticating (yes thats pretty much everyone!). Should be resolved now.

Posted on February 21, 2012 at 2:04 PM

singmajesty

singmajesty
Total Posts: 2189
Joined: August 25, 2011

Re: MASH for Facebook

Fun.

Hey, I recognize that music! ;)

I predict I will marry a woman named Deborah, who will be my best friend, and we'll have four kids and live in a snowy house in the woods... Wait, that's already happened. I don't think MASH is going to help me, but I do remember playing as a kid smiling

Posted on March 01, 2012 at 11:29 PM

NZCoderGuy

NZCoderGuy
Total Posts: 74
Joined: December 08, 2011

Re: MASH for Facebook

Hi there,

I don't suppose you could share how you integrated with facebook? connecting via their API? is there any kind of sample code you could give us to use? smiling

Any help would be greatly appreciated.
smiling

Cheers,
Stephen

Posted on March 24, 2012 at 12:04 AM

plicatibu

plicatibu
Total Posts: 72
Joined: March 18, 2012

Re: MASH for Facebook

I'd like to know how to integrate with facebook.


could you share this with us?

Thanks.

Posted on March 29, 2012 at 8:07 AM

mourlamstudios

mourlamstudios
Total Posts: 152
Joined: February 12, 2012

Re: MASH for Facebook

We used the php facebook library for authentication and the facebook javascript sdk for publishing stories and inviting friends. I won't go into details for those as you should be able to find all you need to authenticate an app and make a simple wall post on the facebook developer portal (developer.facebook.com).

After scratching our heads on how we could integrate facebook, we found a simple solution. We could call javascript functions which were included on the web page with our haxe flash app. We simply called:

ExternalInterface.call("publishStory",finalStory);

inside our nme flash app to execute a simple javascript function on our webpage to display the Publish dialog box.

Javascript function looked something like this:

function publishStory(msg)
{
FB.ui(
{
method: 'feed',
message: msg,
name: 'Tell 5 friends about your MASH story and it just may come true!',
caption: 'What will your MASH future be?!',
description: (
msg
),
link: 'http://apps.facebook.com/mashthegame',
picture: fbPostImage,
},
function(response) {
if (response && response.post_id) {
//alert('Post was published.');
} else {
//alert('Post was not published.');
}
});
}

Same with the invite box. Pretty simple eh??

Our next steps for deep integration are to actually pass user's facebook id as a parameter into swf loader so we can do more advanced things like download friend list, and pull other user information, send emails, etc similar to our iOS version of the game.

We can post more code if interested but it would be well worth it to learn facebook authentication, social plugin basics before trying your hand at haxe integration. Hope this helps someone!

Posted on March 30, 2012 at 6:28 PM

mrmojorisin

mrmojorisin
Total Posts: 48
Joined: April 04, 2012

Re: MASH for Facebook

THANKS!

Posted on June 04, 2012 at 5:32 PM