2

アプリ (ウェブサイト) から Facebook 経由でプライベート メッセージを送信しています。これは Web サイトへの招待リンクですが、次のエラーが発生します。

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)
      })
    });
4

1 に答える 1

1

そこに「frictionlessRequests」と「method: send」があります。これらは互換性のないオプションです。はfrictionlessRequests: true、FB.init() 呼び出しに含まれている必要があり、受信者を事前入力するときに [要求] ダイアログがどのように機能するかに影響します。さまざまなダイアログからのパラメーターが混在しています。

送信ダイアログ呼び出しのサンプルは次のとおりです。

  FB.ui({
          method: 'send',
          name: 'People Argue Just to Win',
          link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
          });

およびサンプルapprequests ダイアログ:

FB.ui({
    method: 'apprequests',
    message: 'Come use this app with me.'
  });
}

また、(発見したように)リンクを正しく解決して 200 応答を返す必要があります。すぐにリダイレクトすると、正しく機能しません

于 2012-05-07T19:02:53.057 に答える