Timeline Action Layout - No Attachment displayed
Asked Answered
S

3

7

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?

Slipper answered 11/1, 2012 at 16:44 Comment(0)
S
1

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.

Slipper answered 19/1, 2012 at 15:36 Comment(0)
G
2

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

Gutshall answered 18/2, 2012 at 15:29 Comment(0)
S
1

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.

Slipper answered 19/1, 2012 at 15:36 Comment(0)
P
0

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.

Prowess answered 17/1, 2012 at 20:18 Comment(3)
as I mentioned in the question all the parameters are parsed correctly as I tested with the facebook debug toolSlipper
@Ben: can we post action with some custom propertiesSense
@Sense Depends what you mean by custom parameters. You can create actions and objects using the Facebook Open Graph, but you are limited to a certain extent with what you can post. Open up a question with more detail and link it here, I will have a look :-)Prowess

© 2022 - 2024 — McMap. All rights reserved.