开发者

FB Connect - Can It Be Used to share message with multiple users?

I suppose the answer is pretty simple, but i cant find conclusive answer either way.

Is it possible to use facebook to log in a user, fetch their friends, allow them to select them and then post to their profiles in turn, even if that means firing up a custom modal with html to select from the list of u开发者_开发技巧sers friends before passing the IDs on to the publishStream function in a loop.

Any response would be dandy. Thanks guys and gals.


If you post to the logged-in user's stream, you have no control over which friends see it in their own streams.

Alternatively, you can send facebook notifications to friends that were selected, subject to the daily notification limit imposed on your app by facebook. Be aware that facebook is phasing out noficiations.


You can do exactly what you said. Just get the list of user IDs before hand using your custom dialog you mentioned. Then call the FB.ui function repeatedly, populating the "to" parameter with each friend ID.

    FB.ui(
        {
         method: 'feed',
         to: #,
         name: 'name of post',
         link: 'http://link.com',
         picture: 'http://link.com/image.jpg',
         description: 'descriptive text',
         },
        function(response) {
            if (response && response.post_id) {
                alert('Post was published.'+response);
            } else {
                alert('Post was not published.'+response);
            }
        }
    );
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜