Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { "rules_post_nodes_to_facebook_wall_on_update" : {
- "LABEL" : "Post nodes to Facebook Wall",
- "PLUGIN" : "reaction rule",
- "OWNER" : "rules",
- "TAGS" : [ "facebook" ],
- "REQUIRES" : [ "rules", "fb_autopost_entity" ],
- "ON" : { "node_insert" : [] },
- "IF" : [
- { "node_is_of_type" : {
- "node" : [ "node" ],
- "type" : { "value" : { "blogginl_gg" : "blogginl_gg" } }
- }
- },
- { "entity_has_field" : { "entity" : [ "node" ], "field" : "body" } },
- { "entity_has_field" : { "entity" : [ "node" ], "field" : "field_facebook_published" } },
- { "data_is" : { "data" : [ "node:field-facebook-published" ], "value" : 1 } }
- ],
- "DO" : [
- { "entity_create" : {
- "USING" : {
- "type" : "facebook_publication",
- "param_type" : "link",
- "param_user" : [ "site:current-user" ]
- },
- "PROVIDE" : { "entity_created" : { "facebook_link" : "Facebook Link" } }
- }
- },
- { "data_set" : {
- "data" : [ "facebook-link:field-facebook-message" ],
- "value" : [ "node:body:summary" ]
- }
- },
- { "publish_to_facebook" : {
- "USING" : { "publication" : [ "facebook-link" ], "pages" : "1595417287362920" },
- "PROVIDE" : { "facebook_publication_id" : { "facebook_publication_id" : "1595417287362920" } }
- }
- },
- { "data_set" : { "data" : [ "node:field-facebook-published" ], "value" : 0 } },
- { "drupal_message" : { "message" : "[node:title] postat till Facebook." } }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement