最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

facebook - Send a message to a friend, I wonder Javascript API - Stack Overflow

programmeradmin0浏览0评论

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: "",

        description: "Description Description",

        picture: ".gif",

        tag: "Tag",

        name: "name names",

        access_token: accessToken

        }, Function (response) {

        if (! response | | response.error){

            alert ("error");

        }

        else{

            alert (response.id);

        }

    })

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.",

        description: "Description Description",

        picture: "http://sstatic.naver/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);

        }

    })
Share Improve this question edited Apr 10, 2012 at 5:08 Somnath Muluk 58k38 gold badges224 silver badges230 bronze badges asked Apr 10, 2012 at 2:58 김동훈김동훈 612 silver badges5 bronze badges 2
  • Do you want a javascript library that will send a message to multiple recipients on facebook? – BillRobertson42 Commented Apr 10, 2012 at 3:17
  • Somnath Muluk - plug-in no~no~ / library ok!! ^^; – 김동훈 Commented Apr 12, 2012 at 5:51
Add a ment  | 

1 Answer 1

Reset to default 3

You want to send a message to a friend on Facebook, or post to the Facebook wall for all to see? I am going to assume sending a message to a friend on Facebook.

Manual

If you want to send a message to friends on Facebook using the JS SDK, follow these instructions: https://developers.facebook./docs/reference/dialogs/send/

This isn't automatic and will still show a dialog box for the user to confirm.

Automatic

If you wanted to do it in the background via the Graph API, you can't. Here is a link explaining it in further detail why you can't and other options you have: https://stackoverflow./a/4061298/540339

发布评论

评论列表(0)

  1. 暂无评论