5

I am a developer from the Republic of Korea.

I am currently making Facebook and Twitter-based websites.

I want to use a JavaScript API that can send message to friends,

So I consulted the iframe Javascript API methods or using Facebook page looked as sending.

I wonder,

I use to send messages to friends as a Javascript API that provides a?

I do not know English well. So I used Google translator.

Please understand.

(Edited, fixed some grammar and rewording)

FB.api (path, "post", {

        message: msg,

        caption: "caption caption",

        link: "http://www.naver.com",

        description: "Description Description",

        picture: "http://sstatic.naver.net/search/img3/h1_naver.gif",

        tag: "Tag",

        name: "name names",

        access_token: accessToken

        }, Function (response) {

        if (! response | | response.error){

            alert ("error");

        }

        else{

            alert (response.id);

        }

    })
4

1 回答 1

3

您想在 Facebook 上向朋友发送消息,或发布到 Facebook 墙上供所有人查看?我将假设在 Facebook 上向朋友发送消息。

手动的

如果您想使用 JS SDK 向 Facebook 上的朋友发送消息,请按照以下说明操作:https ://developers.facebook.com/docs/reference/dialogs/send/

这不是自动的,仍会显示一个对话框供用户确认。

自动的

如果您想通过 Graph API 在后台执行此操作,则不能。这是一个链接,详细解释了为什么你不能和其他选项:https ://stackoverflow.com/a/4061298/540339

于 2012-04-10T04:55:33.047 回答