Now that you are able to authenticate against Facebook, it's time to post a photo from the gallery to your wall! To achieve this, you have to use Facebook's graph API, making a call to the correct graph function with the correct permissions.
We're going to extend our existing code to add a new button and function that will take some parameters and execute a graph request against the Facebook API.
Next, we need to create another button to post to Facebook. Add the following code after the code that adds the Facebook button to the window.
To start, let's add a new button that will sit under the login button but remain invisible until the login is successful. To do this, add the following code under the previous ...