Post a CanvasSnapshot to users Facebook Wall

Get help using Construct 2

Post » Fri Mar 29, 2013 6:06 pm

Hi,

I've just started using Contruct2 and I really love it. I'm creating a simple drag-and-drop game where users can create a composition out of a number of objects.

When a user has finished, I want them to be able to take a snapshot of the game window then post the resulting image to their Facebook wall. I can capture the image with the Canvas Snapshot event and even open it in another browser window but short of instructing the user to then manually download then re-upload the image, I'm stuck.

I have followed the Facebook Tutorial (which isn't quite what I want to do) but it did get me 90% there. I have registered my App at developers.facebook.com and I'm now able to use the Facebook object to open a 'share' dialogue, but then the final hurdle is the Image URL. When I try to pass on "CanvasSnapshot" as the image link URL I get an error from Facebook saying:

API Error Code: 100
API Error Description: Invalid parameter
Error Message: link URL is not properly formatted

Which of course I understand, as obviously "CanvasSnapshot" means nothing to Facebook. Can anyone give me any tips in accomplishing what I'm trying to do? Below is a screengrab of my current Event Sheet.



Many thanks,
Russ
B
3
Posts: 5
Reputation: 740

Post » Fri Mar 29, 2013 6:34 pm

I went through this recently when creating my Facebook plugin. What I learned is to pass image data like this you need sever side coding. I did add the ability to upload a physical picture URL through javascript to my plugin but what you want requires server side coding.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Mar 29, 2013 6:53 pm

Hmmm, thanks for the answer. Unfortunately, just what I suspected! As I'm not a developer that seems a little out of reach for me. :( I guess I'm stuck with opening the image in the browser and instructing the user to manually download and upload.

Many thanks for the assistance though,
Russ
B
3
Posts: 5
Reputation: 740

Post » Fri Mar 29, 2013 7:09 pm

I don't suppose you're an artist? I'm looking for some button images for my app. I could in turn spend the time to build you the needed php file. But it you search google with the terms php Facebook upload image data example then you should be able to find something that you can easily do yourself.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Mar 29, 2013 8:08 pm

I am a graphic artist, yes! What would you be looking for?
B
3
Posts: 5
Reputation: 740

Post » Fri Mar 29, 2013 8:23 pm

Hmm I could really use a mascot image. I'm making a contact manager for my wife's business. I could use some sort of cute little wizard holding a phone book? Doesn't have to be extravagant. Just a little something. You can send me a private message if your interested in a swap of skills. :) I've got to run for a little bit and grab my youngest from daycare but ill be popping in and out throughout the night/weekend.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Mar 29, 2013 8:35 pm

If not this website did answer to question with a working code sample for php.
http://stackoverflow.com/questions/8333415/upload-base64-encoded-images-using-facebook-sdk
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Mar 29, 2013 9:08 pm

Thanks! I have no idea how to actually use that script! :) ...although I could probably discover how with a bit of poking and prodding.

I'd love to create you a wizard character! I tried DM'ing you, but the forum won't let me. Could you maybe DM me your email address?

Cheers,
Russ
B
3
Posts: 5
Reputation: 740

Post » Fri Mar 29, 2013 9:16 pm

I also found this:

http://stackoverflow.com/questions/9176633/upload-images-on-facebook-using-php

Don't know if that could help me too.
B
3
Posts: 5
Reputation: 740

Post » Fri Mar 29, 2013 9:19 pm

Pmed my email and Facebook addresses.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Next

Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 7 guests