How To Publish Actions On Timeline « Facebook

How To Publish Actions On Timeline

Step 1: visit and then select your app if you have multiple apps and click on Edit open Graph in Open Graph section.

Step 2: Click on Get Code in Object Types and copy the highlighted code from popup window and save it somewhere.

Step 3: Click on Get Code in Action Types and copy the access token as shown in the below image and save it also.

Step 4: Make your own script and then, paste the codes in it.

<html xmlns=”” dir=”ltr” lang=”en-US”

Paste the code copied in step 2

<script type=”text/javascript”>
function post()
FB.api(‘/me/Your_Namespace:action‘ +
‘? the access token copied in step 3‘,’post’,
function(response) {
var msg = ‘Error occured’;
if (!response || response.error) {
if (response.error) {
msg += “\n\nType: “+response.error.type+”\n\nMessage: “+response.error.message;
else {
alert(‘Post was successful! Action ID: ‘ +;


<div id=”fb-root”></div>
<script src=””></script>
appId:’Your_appId‘, cookie:true,
status:true, xfbml:true, oauth:true
<input type=”button” value=”Post To Your Timeline ” onclick=”post()” />


Leave a Reply

Your email address will not be published. Required fields are marked *