How To Publish Actions On Timeline (Updated)

By | July 8, 2012

On 31st May Facebook had announced few changes in open graph approval process and also Updated Open Graph Publishing Guidelines in which some important parts were:

Additional publishing guideline
For stories about watching a video or reading an article, you must use the built-in watch and read actions. We’ll no longer approve custom actions for these stories.

90-day update window

  • Even if we’ve approved your custom action for reading an article or watching a video, you must migrate to using a built-in action, resubmit your app and get approved. Please review the requirements for working with read and watch actions.
  • Built-in watch and read actions can only be published after someone engages with the content for 10 or more seconds. If a video is shorter than 10 seconds, the viewer must watch the entire video.
  • Tagging people and places:
  • Only encourage people to tag friends when they have actually performed an action together.
  • Only encourage people to tag a location if they are currently at that place

So according to guidelines above developers have to use built-in actions instead of custom read and watch actions and also to post action only when user engages with the content for 10 or more seconds, to meet these requirements I thought I should write an updated tutorial on it because in my earlier tutorial on How to publish actions on timeline we had used custom actions to post on users timeline.

So lets start the tutorial without wasting any time!

I am assuming you already know how to setup Facebook so i will only cover the open graph section.

1. First go to open graph section of your app and click on Create New Action Type as shown below

2. Now select built-in read action type as shown below

3. When you click on submit button you will now see objects and aggregations are automatically added as shown below

4. Now when you click on submit button you will see a message

You must publish at least one action to your Timeline using this action type. Review the documentation.

To publish built-in read action you can download package from here, now all you have to do is upload all the files to your server, after uploading open config.php file and replace dummy FACEBOOK_APP_ID and FACEBOOK_SECRET with your apps id, secret and also fbrdurl, now for fbrdurl if you have uploaded your files to http://yoursite.com/yourdirectory/ then the fbrdurl will be http://yoursite.com/yourdirectory/demo-page.php once you have done that you have finished, you can now check the demo page by visiting the http://yoursite.com/yourdirectory/demo-page.php.

Note: By using built-in read action type action will be posted only once for each url if action is already posted then you will see an error saying

(#3501) User is already associated to a article object on a unique action type Read. Original Action ID:

now you have to delete previously posted action if you want to use the same url for OG action posting.

 

7 thoughts on “How To Publish Actions On Timeline (Updated)

  1. giovanni

    hello, after all the letters on my wall and comes out I read an article that I do not understand and how to release this news on every article … thanks;)

    Reply
  2. Hari

    hi Hasnain,

    I got this error

    Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /mysite.com/fbapp/config.php on line 13

    Reply
    1. Hasnain Post author

      I have tested it its working fine, if you can post your code here with the changes you have made then it would be more easy to debug.

      Reply
  3. kunal

    Hi i have uploaded your download package on my server but nothing is happening when ever i open the link it just redirects on other page and the other page redirects to previous one

    Reply
  4. Mario

    The tutorial works perfectly, now I would like to ask a question, how do I post the measures of reading all the articles? should be done with every single item or theres a way that you do once and then on each article that is published there this function? Using WordPress I tried several plugins but it tells me that I have to provide documentation, to avoid this I have followed your tutorial but I would like to integrate it automatically in all future articles you can?

    Reply

Leave a Reply

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