FB.ui Send Dialog 500 error ... but only when linking to my site?

I use FB.ui to show the send dialog. It works great ... unless I provide a link to the new site I'm working on.

This works (FB dialogs are displayed, the receiver receives the message):

FB.ui({ method: 'send', name: 'Check out my new site!', link: 'http://nytimes.com/', }); 

But it breaks when I change the value of the link to "http://plumspotter.com/".

When I change "http://nytimes.com/" to the site I'm working on "http://plumspotter.com/", it works, but the recipient does not receive the message.

Using Firebug> Net panel I see that when FB.ui is sent to facebook.com/dialog/send, it returns 500 (internal server error).

Any idea why Facebook won't let me use FB.ui to post a link to http://plumspotter.com/ ?

+4
source share
4 answers

I recently ran into the same problem. Facebook will analyze your page before sending the link; if it fails, it will cause a 500 error.

Additional Information:

If your page does not return the code 200, it will not parse your page and will cause a 500 error.

Make sure that the page associated with you is not redirected to other pages, even if they are in your application. Redirect is a 3xx code that is not accepted by facebook.

Since your site has htaccess - facebook can not scroll the page you are linking to, and therefore will cause an error.

+6
source

Visiting your site http://plumspotter.com I receive a htaccess password invitation: Access to the Plumspotter Alpha is restricted . If you remove the barrier, it should work without problems.

+2
source

After several hours of problems, I realized that this type of exchange does not support the type of link redirection header () . A simple solution is to redirect to meta: <meta http-equiv="refresh" content="0;URL="> and above request the debug old URL that you use https://developers.facebook.com/tools/debug . And ... It works.

0
source

I got the same error (HTTP 500), and it turned out that I was binding to the IP address :

Bad : http://173.194.75.106

Good : http://google.com

0
source

Source: https://habr.com/ru/post/1403548/


All Articles