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?
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?
Comments
Comment #1
Dave Cohen commentedEnable 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.
Comment #2
georgedamonkey commentedThanks!
Everything seemed to go well. But, when I post to the site now, I get this error pop up:
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?
Comment #3
Dave Cohen commented{*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'].
Comment #4
georgedamonkey commentedI'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:
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?
Comment #5
georgedamonkey commentedYou 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:
So now, when I post new content, I get a dialog box that comes up that says this:
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!
Comment #6
psi-borg commentedi'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.
Comment #7
psi-borg commentedto 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?
Comment #8
psi-borg commentedyou 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.