Post a CanvasSnapshot to users Facebook Wall

0 favourites
  • 12 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • 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.

    <img src="http://www.louisepetit.com/screengrabs/capture.jpg" border="0" />

    Many thanks,

    Russ

  • 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.

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • I am a graphic artist, yes! What would you be looking for?

  • 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.

  • 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

  • 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

  • I also found this:

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

    Don't know if that could help me too.

  • Pmed my email and Facebook addresses.

  • I'll get the php file up and running this evening after supper. Probably 3 or 4 hours from now.

  • RussBass I think is all possible just using javascript, see coderwall.com/p/4qpmfw and the Github source (anyone want to make a plugin <img src="smileys/smiley1.gif" border="0" align="middle" />? )

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)