我正在从我的应用程序(网站)通过 facebook 发送一条私人消息。这是一个网站的邀请链接 - 但是,它给出了以下错误:
The website encountered an error while retrieving https://www.facebook.com/dialog/send. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition
正在发送的链接邀请链接类似于 http://myapp.com/invitation - 无效 http://myapp.com - 有效!
如何在正斜杠后使它与某些东西一起工作?
实际代码:
:javascript
$(function(){
$('li.friend:not(.invited) label').live('click', function() {
FB.init({appId: #{Rails.application.config.fb_app_id}, xfbml: true, cookie: true})
FB.ui({
method: 'send',
display: 'popup',
name: 'New Invitation',
link: 'http://myapp.com/invitation/',
to: this.parentNode.getAttribute("data-id"),
frictionlessRequests:true,
show_error: 'true'
})
$(this).parent().addClass("invited")
$(this).siblings().prop("checked", true)
})
});