Jump to content

Social how to ?


Recommended Posts

Check the facebook and twitter API documentation, both contain multiple examples for programmatically performing actions like sharing stories. Presumably you're wanting a button inside the canvas (i.e. via Phaser) as apposed to the FB/Twitter link button HTML snippets they provide.

Very very briefly, both require you to load up their sdk (a simple script tag link is easiest), initialise it (in FB's case this requires you to have created a facebook app for them to validate from, twitter is more permissive and therefore easier) and then just call a function to initiate the share actions. The flow from the web is generally pretty seamless from there, the user logs in (if not already) and confirms the share, but you'll probably want to handle the callbacks for success/failure and you'll probably additionally want to track who is actually using those buttons (the FB app you set up will do this, slightly more complex with Twitter).

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...