开发者

How to make users select their friends and post on their wall in facebook

开发者 https://www.devze.com 2023-03-25 18:15 出处:网络
I know this has been asked several times before, but Facebook changes its api of开发者_开发知识库ten so comes the necessity to ask this question again.

I know this has been asked several times before, but Facebook changes its api of开发者_开发知识库ten so comes the necessity to ask this question again.

I have an iframe application, how to make users select their friends and post on their wall the message which comes out of my application in facebook using FB.ui ? or some other better method.


The simplest way to do this is via the "send" widget. http://developers.facebook.com/docs/reference/plugins/send/

If you have the stream_publish right from the user, you can also fetch his friends, let the user selects the friends he wishes to post to, and than in a loop you post to this users via graph api on the wall. (without the stream_publish right, you would have to open a fb.ui for EACH of the friends the user wants to post to.


for share to friend:

            FB.ui({
                method: "apprequests",
                display: "iframe",
                message: 'take a tour to my app',
                data: '123'
            });

for post to wall:

        FB.ui({
            method: 'feed',
            link: 'http://myapp.com',
            display: 'iframe',
            message: 'take a tour to my app',
            name: 'Click to view my app',
            caption: 'Hello my app'

        });
0

精彩评论

暂无评论...
验证码 换一张
取 消