Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can create facebook posts with rules, but when I try to delete them I get "(#200) The user hasn't authorized the application to perform this action"
I created a entity reference field on the node and stored the remote id on the facebook publication entity so the correct information are passed to the rule action.
The app is authorized to manage pages.
Comments
Comment #2
achikas CreditAttribution: achikas commentedSame here. I am not sure if this is a module issue.
maybe i need to make some settings in the Facebook app, but have now clue where to start.
Would be great if someone solved this and give a hint how to configure the module or fb app the right way.
Comment #3
LeDoug CreditAttribution: LeDoug commentedSame here. Look like the remoteDelete() is not working or the wrong token are used.
If anybody has solved this, please give us a hint :D
Comment #4
LeDoug CreditAttribution: LeDoug as a volunteer commentedI've made it working by updating the facebook php sdk to 4.0 and applying the update patch to the module..... but my client server php version was 5.3 and the new 4.0 SDK require php 5.4....
SO.... after 1-2 hours, I somehow realized that the access token where missing when performing a remote delete.
So I have created my own functions into the fb_autopost module to add the page access token when performing a delete request.
file: fb_autopost\fb_autopost_entity\fb_autopost_entity.rules.inc
I've add in existing function "fb_autopost_entity_rules_action_info"
After I created a new function named "rules_action_delete_from_facebookMC"
file: \fb_autopost\class\FBAutopost.php
I've created a new function named "remoteDeleteMC"
file: \fb_autopost\fb_autopost_entity\class\FBAutopostEntity.php
I've also created a new function named "remoteEntityDeleteMC" inside the class "class FBAutopostEntity extends FBAutopost"
Finaly I've created a new module named "mc_fb_autopost" and add this function to the mc_fb_autopost.module file
When I 've created my rules to "delete a facebook publication", I 've selected from the "React on event" dropdown list "Delete from Facebook MC" and I has worked like a charm.
I have also a rules which triggers on node update which can now delete and create/recreate a facebook publication so I did not bother to mess with the module edit functionalities.
I hope this help