Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FB.ui Send Dialog 500 error... but only on link to my site?

I'm using FB.ui to show the Send dialog. It works perfectly... unless I specify the link to the new site I'm working on.

This works (FB dialog displays, recipient receives message):

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

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

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

Using Firebug > Net panel I see that when FB.ui posts to facebook.com/dialog/send it's returns a 500 (internal server error).

Any idea why Facebook wouldn't allow me to use FB.ui to send a link to http://plumspotter.com/?

like image 772
David Ries Avatar asked Feb 21 '23 00:02

David Ries


1 Answers

I recently faced the same problem. Facebook will analyse your page before sending a link, if it cant, it will throw a 500 error.

More info:

If your page does not return a 200 code, it will not analyse your page, and will throw up a 500 error.

Make sure the page you link does not redirect to any other pages, even if they are within your app. A redirect is 3xx code - which is not accepted by facebook.

Since your site has htaccess - facebook cant scroll through the page you linked - and hence will throw up an error.

like image 60
Karan Avatar answered Mar 16 '23 00:03

Karan