OAuthException (#368) The action attempted has been deemed abusive or is otherwise disallowed - facebook-graph-api

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.

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...

I believe this message is encountered for one of the two reasons :
Your post contains malicious links
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

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.

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.

Related

Sending a file to an API using Postman form-data

I'm attempting to send a file to an API I've been developing through Postman, but the API has repeatedly failed to receive it. I initially thought this was a middleware issue, and attempted to use different modules to fix it. However, I have since realized that this is actually an issue in Postman itself
When I send the request and then review the request body in the Postman console, I can see that it fails to send the file at all, listing it as undefined.
I have seen a few people having this same issue, but was not able to find a solution that worked for me. I have already tried unchecking the Content-Type header, as well as closing and reopening the tab and Postman.
EDIT: I did not receive an answer to this, but I was able to find a workaround - coding a super basic html form that made a post request to the relevant endpoint. This did work, so I'm going to say this is likely a bug or settings issue in Postman itself, rather than something to do with my server's code.
Pretty sure you were in this thread already, but just in case,
this answer, and this one might be what you need.

How do I get Alexa Voice Service registration code?

How do I get a registration code or otherwise solve this problem?
While writing this question, I realized the crux of this problem is the bottom-most part of this question: I'm not getting the popup I'm supposed to get and when I enter the URL in a browser it says invalid registration code.
I'm attempting to develop an Alexa Voice Service application. Website/companion service only. I have gone through the Reference Implementation Guide twice and have double checked that all of the setup has been done correctly.
This is the server error I get: invalid registration code. I never did anything with a registration code and can't seem to find anything about a registration code (relevant to Alexa) anywhere after googling quite a bit.
Listening on port 3000
error: { [InvalidRegistrationCode: The provided registration code was invalid.]
name: 'InvalidRegistrationCode',
message: 'The provided registration code was invalid.',
status: 401 }
Error: Can't set headers after they are sent.
Here's the client output:
vlcj: (DefaultMediaPlayer.java:183)
addMediaPlayerEventListener(listener=com.amazon.alexa.avs.AVSAudioPlayer$1#4b3a4950)
There was a problem connecting to the Companion Service. Trying again in 2 seconds. Please make sure it is up and running.
[DEBUG] joining on thread Thread[Timer-0,5,com.amazon.alexa.avs.AVSApp]
There was a problem connecting to the Companion Service.
Trying again in 2 seconds. Please make sure it is up and running.
The AVS launcher opens too, and when I record something and send it I get:
com.amazon.alexa.avs.AVSException: 403 Invalid Access Token
The instructions mention (at the very bottom of the reference guide) that I need to:
Please register your device by visiting the following website on any system and following the instructions: https://localhost:3000/provision/************** That URL is supposed to pop something up once the companion service but that hasn't happened.
Any thoughts on how can I fix this?
I was following a good document Project: Raspberry Pi + Alexa Voice Service at https://github.com/amzn/alexa-avs-raspberry-pi . It describes all steps very well.
Please take a look at the following steps:
3 - Getting started with Alexa Voice Service
3.1 Register for a free Amazon Developer Account
3.4 Register your product and create a security profile.
6 - Enable Security Profile
This thread on the Amazon developer forums seems related: http://forums.developer.amazon.com/forums/thread.jspa?threadID=11327&tstart=0
Quoted response:
There are a number of potential issues causing that error.
You might be sending an invalid scope. Are you sending "alexa:all" as
the scope? Or, your security profile might not be correctly linked. Is
it selected in the dropdown on the developer portal?
Are you getting an access token from the companion service, or is the
text box blank? If you're not getting an access token, check that your
device serial number matches between the companion service and the
java client. If you're getting an access token, the problem is more
likely with your security profile.
You should also look at these threads to see if they're helpful...
(links removed due to reputation requirement)
If that doesn't help, you'll probably have more luck asking the AVS team directly on their forum site.

How to monitor an action by user on Glass

I have a mirror API based app in which i have assigned a custom menu item, clicking on which should insert a new card. I have a bit of problem in doing that. I need to know of ways i can debug this.
Check if the subscription to the glass timeline was successful.
Print out something on console on click of the menu.
Any other way i can detect whether on click of the menu, the callback URL was called or not.
It sounds like you have a problem, but aren't sure how to approach debugging it? A few things to look at and try:
Question 1 re: checking subscriptions
The object returned from the subscriptions.insert should indicate that the subscription is a success. Depending on your language, an exception or error would indicate a problem.
You can also call subscriptions.list to make sure the subscriptions are there and are set to the values you expect. If a user removes authorization for your Glassware, this list will be cleared out.
Some things to remember about the URL used for subscriptions:
It must be an HTTPS URL and cannot use a self-signed certificate
The address must be resolvable from the public internet. "localhost" and local name aliases won't work.
The machine must be accessible from the public internet. Machines with addresses like "192.168.1.10" probably won't be good enough.
Question 2 re: printing when clicked
You need to make sure the subscription is setup correctly and that you have a webapp listening at the address you specified that will handle POST operations at that URL. The method called when that URL is hit is up to you, of course, so you can add logging to it. Language specifics may help here.
Try testing it yourself by going to the URL you specify using your own browser. You should see the log message printed out, at a minimum.
If you want it printed for only the specific menu item, you will need to make sure you can decode the JSON body that is sent as part of the POST and respond based on the operation and id of the menu item.
You should also make sure you return HTTP code 200 as quickly as possible - if you don't, Google's servers may retry for a while or eventually give up if they never get a response.
Update: From the sample code you posted, I noticed that you're either logging at INFO or sending to stdout, which should log to INFO (see https://developers.google.com/appengine/docs/java/#Java_Logging). Are you getting the logging from the doGet() method? This StackOverflow question suggests that appengine doesn't display items logged at INFO unless you change the logging.properties file.
Question 3 re: was it clicked or not?
Depending on the configuration of your web server and app server, there should be logs about what URLs have been hit (as noted by #scarygami in the comments to your question).
You can test it yourself to make sure you can hit the URL and it is logging. Keep in mind, however, the warnings I mentioned above about what makes a valid URL for a Mirror API callback.
Update: From your comment below, it sounds like you are seeing the URL belonging to the TimelineUpdateServlet is being hit, but are not seeing any evidence that the log message in TimelineUpdateServlet.doPost() is being called. What return code is logged? Have you tried calling this URL manually via POST to make sure the URL is going to the servlet you expect?

SCRIPT70: Permissions Denied

I have been banging my head against a wall with this for a few hours now.
I have checked all of our Facebook applications in IE and I get the following error when the permissions dialogue box has been accepted:
SCRIPT70: Permission denied
all.js, line 22 character 4321
I have looked at past posts but they seemed to have happened a while back and Facebook have said that the issue is closed. It seems to have re-surfaced.
I am using the correct https code and it all works fine in Chrome/Safari/Firefox.
Has anyone got any ideas on this ?
Many thanks
The channelUrl solution works fine except in one specific case. If you have a script on your page that shortens the document.domain, then the file you create for the channelUrl must also shorten the document.domain to match.
For instance, if my host page is "foo.bar.com" and I have JavaScript shorten the document.domain to "bar.com" (which is legal, not advised, but legal), then the file I specify in channelUrl must do the same.
I know that Facebook states the file for channelUrl must contain just one line and that must be the script tag they specify, but that is really not the case. As long as the script tag is in the head of the page your create, all is well. Also, the document.domain shortening must happen before the Facebook code is called on both the host and channelUrl page.
I hope this helps others out, it sure was a pain to figure out on our site. Oh, and we have to shorten our document.domain because of our ads server, so it's something we have no control over.
One reported cause of this is if the channelURL you defined in the SDK init method doesn't match (protocol and domain) with the page load itself
i.e if you use a HTTP channel URL and the user is using HTTPS, or vice-versa, it may not work.
Try changing that and see if it helps. If you don't have a channelURL defined, you should add one (note that it's case sensitive).

PayPal Django

I am using Django-PayPal plugin (http://github.com/johnboxall/django-paypal/tree/master), which works almost fine with one problem.
I followed integration process and think that everything is the same as in the guide.
But there is the problem, that I always get the INVALID response flag. I will not be able to determine the sucessfull IPN.
Do you know, how to not get the INVALID response in the IPN?
I know it's an old question, but some might still benefit from this.
You have to have "Payment Review" disabled for the PayPal test account you use to make the payment with. Then it should work as expected.
I'm developing a site using this at the moment, and when using the sandbox I get the correct responses for the payment status, however the buyers email is always marked as invalid.
I believe it's due to the sandbox environment.
I kept getting an INVALID response from IPN for such a long time....only to figure out that I was using the live server (www.paypal.com) instead of the sandbox (sandbox.paypal.com).