My Facebook application is displaying ‘Method Not Allowed’

Created by Adam Coley, Modified on Mon, 17 Jul, 2017 at 11:25 AM by Adam Coley

If you are encountering this problem with your Facebook application hosted on your hosting account, then your application is most likely based on HTML.

By default POST is not within the allowed methods for HTML files because that language cannot process POST queries. Even though Facebook are aware of this, their API is structured to always execute a POST query to the target URL to validate its availability. When the target is HTML, it is highly likely to encounter the "Method Not Allowed" error.

In order to prevent facing this error you need to change the way Apache handles requests to HTML files. The most commonly used method is to force HTML files to be handled by PHP. You can do this by creating an .htaccess file in your application's main directory, and adding the following line:

AddHandler application/x-httpd-php52 .html .htm .shtm

If you are having difficulties applying this fix to your Facebook application, hosted on a hosting account, please feel free to contact our Technical Support Team and we will apply the required modifications for you.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article