Possible for new content to show on a users feed?
georgedamonkey - June 8, 2009 - 16:29
| Project: | Drupal for Facebook |
| Version: | 6.x-2.x-dev |
| Component: | Canvas Pages |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is there any way to have it so when new content gets added to the site, which shows up on the canvas page, to show up on a users news feed?

#1
Enable the DFF feed module. And actions and triggers.
Create a feed template.
Configure an action of type Facebook Feed: show dialog, select the template you've created.
Create a trigger for that action on node create.
Done.
If you'd rather not use actions and triggers, you can call fb_feed_show_dialog() from your hook_nodeapi(). It's not well documented at the moment. So post back here if you have trouble.
#2
Thanks!
Everything seemed to go well. But, when I post to the site now, I get this error pop up:
Application response errorSupplied template data does not cover the following tokens [title, riponpl] needed for template '{*actor*} wrote about {*title*} on {*riponpl*}.' You can see this because you are one of the developers of the app.
For the one line template, I have this code:
{*actor*} wrote about {*title*} on {*menashapl*}I'm guessing I made a typo with that line somewhere? Or, is there something else I've done wrong?
#3
{*actor*} and {*target*} tokens are filled in by facebook. The other tokens must come from Drupal. There are two ways to ensure they are supplied. One is to use the token module. Make sure your tokens are one's that token supports, and that token substitution is enabled on the action.
the other option is to implement fb_feed_show_dialog_alter(&$params). In that function set $params['tokens'].
#4
I've got token setup, and also checked the box to use token replacement in the action I created. But, that's where I'm stuck. With the token replacement option checked on the action, the error I get now when I post is slightly different:
Supplied template data does not cover the following tokens [menashapl] needed for template '{*actor*} wrote about {*title*} on {*menashapl*}.'So, I know it's something to do with 'menashapl', but I have absolutely no idea what. Do I need to do something with token so it understands what menashapl is?
#5
You know... If I would only pay attention, I'd accomplish so much more...
In setting up the feed template, I was replacing fb-app-title with what the title of the app was. Very stupid me. So, I replaced that with this:
{*actor*} wrote about {*title*} on {*fb-app-title*}So now, when I post new content, I get a dialog box that comes up that says this:
Publish this story to your Facebook Wall and your friends' home pages?With no error messages. Once I click Publish, it briefly says that the content was published to the wall. I looked, and it does show up on my wall since I made the post. Is there any way I can have new posts show up on the app's wall as well? Also, is there a way to make the fb-app-title link to the facebook app?
Thanks again for all your help and your patience!
#6
i'm using the audio mod with fb and am wondering where to define new tokens that are listed for {*audio
it returns the same error the op had.
#7
to clarify, drupal is defining the audio module tokens in the case where they must be defined for the fb app - but not for the content that gets published outside the app, ie, walls, feeds. i'm guessing that for those tokens, fb must define them but doesn't know how - but why would some drupal tokens get passed (like {*nid*}) but not others (like {*audio-player*})?
i can hack it with fb_feed_show_dialog_alter(&$params) or a write a little php file that runs a little query and outputs the player fbml, but i'm a sloppy coder and am worried i'll break something unintentionally.
what do you suggest dave?
#8
you commented in the template form, wondering what to do with the body field... why not use it for explicit template data, instead of assuming that drupal tokens are going to work... some don't.