2

この質問をフォローアップしたいと思います。FB.ui を使用してリンクを送信すると、一部のユーザーでまったく同じエラーが発生しました。とにかくそれをチェックして、UIをユーザーに表示するかどうかを決定することはありますか?

API Error Code: 100
API Error Description: Invalid parameter
Error Message: Viewer cannot message specified recipients.

<a href='#' onClick="
        FB.ui({
          method: 'send',
          link: 'http://www.xxxxxxxxxxx.com',
          to: ###########,
          });
">Send a message</a>

URL 送信メソッドを使用しても、一部のユーザーが機能しません。例えば:

エラーユーザー: https://www.facebook.com/dialog/send?app_id=123050457758183&name=People%20Argue%20Just%20to%20Win&link=http://www.nytimes.com/2011/06/15/arts/people -argue-just-to-win-scholars-assert.html&redirect_uri=https://www.bancsabadell.com/cs/Satellite/SabAtl/&to=100000104626944

一般ユーザー: https://www.facebook.com/dialog/send?app_id=123050457758183&name=People%20Argue%20Just%20to%20Win&link=http://www.nytimes.com/2011/06/15/arts/people -argue-just-to-win-scholars-assert.html&redirect_uri=https://www.bancsabadell.com/cs/Satellite/SabAtl/&to=1311251197

(これはhttps://developers.facebook.com/docs/reference/dialogs/send/から取得した共有リンクの例です)


Facebook に報告されたバグ: https://developers.facebook.com/bugs/538638372825668

4

2 に答える 2

2

編集:実際、今では誰もがメッセージで連絡できるはずです。新しい「フィルタリング設定」があるだけです。can_messageこのフィールドは、常に を返す必要があるため、現在は役に立たないと思いtrueます。しばらくすると廃止されると思います。


FQL テーブルには、user必要なものを確認する必要があるフィールドがあります。

can_message (boolean) : ユーザーが別のユーザーにメッセージを送信できるかどうか

ソース: https://developers.facebook.com/docs/reference/fql/user

select can_message from user where uid=USER_ID

USER_IDアプリのユーザーがメッセージを送信したい相手です。

于 2013-03-06T21:16:01.427 に答える
-3

FBAPIを使用できます。

私は次のようなものを使用します:

FB.api('/me/permissions', function (response) 
{
//check contents of response for required permissions here
fb_publish_perm = response.data[0]['publish_stream'] ? response.data[0]['publish_stream'] : false;

if (fb_publish_perm)
{
    // it permissions exist
}
else 
{
    // permissions dont exist launch the ui to request.
}

});

上記は頭のてっぺんからまっすぐに出てきたので、疑似コードとして扱ってください!

于 2013-03-01T14:52:12.190 に答える