Hi, thanks for the excellent module : I have it working for posting on a user's wall when user sign-ups.
BUT...
It's a classifieds website: user posts a node, then admin publishes the node after validation.
I would like to have the node (part of it) published on the user's FB wall once it is published by the admin.
However, I can't have it working, although the debug mode says that the rule is actually fired...
Here is the rule export:
{ "rules_pub_sur_facebook" : {
"LABEL" : "post annonce sur Facebook",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "facebook_rules" ],
"ON" : [ "node_update" ],
"IF" : [
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "annonce" : "annonce" } } } },
{ "node_is_published" : { "node" : [ "node" ] } }
],
"DO" : [
{ "facebook_rules_post_to_my_wall" : { "message" : "Je viens de passer une annonce sur [site:url], [site:slogan].\r\nMon annonce :\u003Ca href=\u0022[node:url]\u0022\u003E [node:field_titre].\r\n[node:field_photos] \u003C\/a\u003E" } }
]
}
}
Any idea of what I am doing wrong?
Comments
Comment #1
fotuzlab commentedIs there any entry in the watchdog for the failed action?
Comment #2
Louis Bob commentedNo, there is no error in the log.
Just this in the "Rules Evaluation Journal":
Comment #3
fotuzlab commentedI'll just try it on my machine and get back on this issue.
Comment #4
fotuzlab commentedHi Louis,
I imported the rule you posted and it worked for me.
What I did:
1. Updated 'node type' in conditions to articles for my local setup.
2. Created an article.
3. went to node/*/edit, published and saved
4. the message was posted to my wall(See attached SS).
Comment #5
Louis Bob commentedThanks a lot for your reply.
I realized what was wrong for me: since i was using test accounts on FB, the email is not operational therefore it was not working.
I have tested it on a real FB account, and it works just fine!
Thanks again :)
Comment #6
BManuel commentedI get this error when I try to post
My log entry
Message: (#100) Missing message or attachmentType: ...
Message: (#100) Missing message or attachment
Type: :OAuthException
Code: 100
User: 1
I have adjusted the rules a 100x still getting the same error.
What are my doing wrong?
Thanks
BM
Comment #7
fotuzlab commentedCode 100 is returned if the message is missing.
Can you confirm that the token you used in Rules for 'message' is not returning NULL for above particular case?
Comment #8
BManuel commentedI tried it with token and with just plain text. same result. So I don't believe it is a token issue. And I tried it with a few apps so, issue is not with apps either.
Thanks
BM
Comment #9
BManuel commentedJust tried it on a fresh install. Same result.
Comment #10
fotuzlab commentedHope there are no major API changes by facebook. Let me try it myself.
Can you share your exported rule?
Comment #11
BManuel commentedUsing same from above here. only changed the node type to article and blog.
Thanks
BM
Comment #12
BManuel commentedHi on a another new install it work twice then just stop working. My debug shows that rules fires, so it is not a rule problem. But I have gotten this error twice now when deauthorizing a user and trying to authorize them again
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'token' doesn't have a default value: INSERT INTO {facebook_rules_user_tokens} (uid, user_grant) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => ) in facebook_rules_profile_submit() (line 94 of /data/disk/o1/distro/001/drupal-7.14.2-dev/sites/all/modules/facebook_rules/facebook_rules.module).
I really need this module so any pointers are greatly appreciated
BM
Comment #13
BManuel commentedJust needed to add extended permission to the facebook apps. Thanks for your time
Comment #14
BManuel commentedSorry had to re-open, problem is back, curiously this works for 4-6 posts then start given "no message or attachment errors".
Comment #15
ajmartin commentedI'm also experiencing this exact issue. Nothing more I can report than what is already stated by BManuel. I used the exported rule posted above and my own rules to no avail.
I'm not sure what is meant by extended permissions, but that doesn't appear to be the solution anyway....
Comment #16
ajmartin commentedSame error when on event "User registered using Facebook connect".
Comment #17
Pls commentedI'm suspecting that http://stackoverflow.com/a/9959706 could be the case, probably Facebook made an API change. Digging on it right now.
Comment #18
Pls commentedActually, this is whole easier fix than expected. The problem was that amp; was prepended before message parameter and that caused this #100 error (which didn't understand message parameter when there is amp; characters before it).
I think this is critical bug, as it's not working without this fix. Attached a patch to fix it and it works on my side. Would love to get any feedback.
Comment #19
BManuel commentedThanks @Pls that fixed the problem for me. Do you by any chance use the http://drupal.org/project/facebook_page_rules module that too has some bug that makes it unusable
Comment #20
Pls commented@BManuel, thanks for testing my patch.
Other testers are welcome too! Please change status to RTBC if you feel that patch clearly solved problem.
Comment #21
Pls commentedChanging version.
Comment #22
BManuel commentedComment #23
fotuzlab commentedThanks PLS for the patch. I have committed it to dev and attributed the commit to you :)
Cheers