-->

OAuthException (#368) The action attempted has bee

2020-07-06 03:35发布

问题:

I'm trying to post a feed on my wall or on the wall on some of my friends using Graph API. I gave all permissions that this application needs, allow them when i make the request from my page, I'm having a valid access token but even though this exception occurs and no feed is posted. My post request looks pretty good, the permissions are given. What do I need to do to show on facebook app that I'm not an abusive person. The last think I did was to dig in my application Auth Dialog to set all permission I need there, and to write why do I need these permissions. I would be very grateful if you tell me what is going on and point me into the right direction of what do I need to do to fix this problem.

回答1:

Had the same problem. I figured out that Facebook was refusing my shortlinks, which makes me a bit mad...but I get the point because its possible that shortlinks can be used to promote malicious content...so if you have shortlinks as part of your test, replace them w the full url...



回答2:

I believe this message is encountered for one of the two reasons :

  1. Your post contains malicious links
  2. You are trying to make a POST request over a non-https connection.

The second one is not confirmed but I have seen that behavior. While same code in my heroku hosted app worked fine, it gave this #368 error on my 000webhost hosted .tk domain which wasn't secured by SSL



回答3:

Just in case anyone is still struggling with this, the problem occurs when you put URLs or "action links" that are not in your own app domain, if you really need to post to an extarnal page, you'll have to post to your app first, then redirect from there using a script or something. hope that helps.

also it's better in my opinion to use HTTPS links, as sometimes i've seen a behaviour where http links would be rejected, but that's intermittent.



回答4:

I started noticing that recently as well when running my unit tests. One of the tests I run is submitting a link that I know Facebook has blocked to verify that I handle the error correctly. I used to get this error:

Warning: This Message Contains Blocked Content: Some content in this message has been reported as abusive by Facebook...

But starting on July 4th, I started receiving this error instead:

(#368) The action attempted has been deemed abusive or is otherwise disallowed'

Both errors indicate that Facebook doesn't like what you're publishing.