Home / Facebook Javascript Test Console

Facebook Javascript Test Console

Publishing to the Graph API

Now we’ll show you how you can use the JavaScript SDK to make a simple “Hello, world!” post on your Facebook profile.

Adding Publishing Permissions

First, we’ll need the publish_actions permission to make this publishing request, so we’ll insert a Login button which requests the correct permissions (click on this if you haven’t already granted the permission):

Using FB.api()

Click me to publish a “Hello, World!” post to Facebook.

Related Guides

Read our quickstart to using the JavaScript SDK for Graph API calls for more info.