Active
Project:
Drupal for Facebook
Version:
7.x-3.3-beta6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2013 at 15:26 UTC
Updated:
2 Feb 2013 at 18:32 UTC
Publish to Facebook work fine but I don't know how to define wich fields would be published.
For example this is what post in Facebook
[IMAGE] MY NODE TITLE Edit Delete CITYDATEETAXONOMYTERMRESUME
I would like to post my custom image and resume fields.
Comments
Comment #1
Dave Cohen commentedBefore fb_stream.module posts to facebook's graph, it invokes hook_fb_stream($op, $data, &$return).
Look for $op == FB_STREAM_OP_PRE_POST. The &$return contains the data that will be posted to facebook. Your custom hook can modify as needed for your site. You'll have to experiment to get it to look just the way you want.
Please post your snippet here to help others looking for the same effect.
Comment #2
RAFA3L commentedThanks!
The admin links Edit Delete come from the Contextual Links module you can disable it or use something like that fore more control
Comment #3
RAFA3L commentedAnd how to define the image to post?
I have one image field to the main image with only one value and another image field with unlimited values for a photo gallery.
When the node have only the main image this is posted fine on Facebook, but when the node have one image in the gallery this is the image posted, and if have more than one none is posted.
Another thing, this error appear after save and in all of the cases above
Notice: Undefined index: uri en theme_image_formatter() (line 602 de /Applications/MAMP/htdocs/pm/modules/image/image.field.inc).
Comment #4
Dave Cohen commentedJust FYI, when I need something like
//drupal_set_message('<pre>'. print_r($return, TRUE) .'</pre>');, I preferTo set a picture, something like this may work in your hook_fb_stream(). Customize for your field name.
Or, get image URL with something like http://www.dave-cohen.com/comment/1000043#comment-1000043
As for the notice, I'm sure as that's in some other module. Is it caused by fb_stream???
Comment #5
Dave Cohen commentedsee also #1895850: Image Field in FB Stream - post to wall, including image