Timeline Action Layout - No Attachment displayed

631 views Asked by At

I am trying to post a Action to the Facebook Timeline using the JS API

FB.api('/me/application:action_type' + '?opject_type='+document.location.href,'post',
      function(response) {
          if (!response || response.error) {
              alert("error");
          } else {
              alert("success");
          }
      });

Posting works quite well and the API returns no error. A new activity appears at the Timeline but only as a small text within the "recent activities" box which looks like this:

enter image description here

What could be the problem if the action is not displayed like in the Attachment Preview of the Action Type Settings? Which look like this: enter image description here

I have linked all the properties from the Object Type and tested my Object URL with the Facebook Debugging Tool and it looks like all the attributes can be parsed correctly by the Facebook scraper.

I also defined a aggregation layout for the action type. So what can be the reason that no Attachment is displayed?

3

There are 3 answers

0
alex On BEST ANSWER

I also reported this issue as a bug to facebook. Their reply was that this behavior is by design and the attachment layout only appears in the activity log or when multiple activities have been posted to a users timeline.

3
Ben Carey On

Have you set the object parameters on your web page? For instance:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# app: http://ogp.me/ns/fb/app#">

<meta property="fb:app_id" content="123" />
<meta property="og:type" content="app:action" />
<meta property="og:url" content="http://www.example.com/" />
<meta property="og:url" content="http://www.example.com/" />
<meta property="og:title" content="Testing Title" />
<meta property="og:description" content="testing Description" />
<meta property="og:image" content="http.example.com/image.jpg" />

You will need to get the correct code off the Facebook Developers website but it is essential that you create your object in order for Facebook to get the parameters from your webpage.

You can test it by simply going into aggregations->preview->add-action, and in event, just paste the webpage. You will see instantly if it works.

0
Stephan Alber On

You can see a single action attachment layout on your timeline by setting "Shown on timeline" instead of "Allowed on timeline", but by default you will never see a single action on the timeline. You will see the single action attachment in the ticker (and maybe in the news stream). If the user doesn't change the display mode You will only see aggregations on a timeline