+ Start a Discussion
Rubal Khanna 6Rubal Khanna 6 

How to send message from salesforce to facebook?

Hi,I want to send message to facebook by salesforce so what is the first step to do this?
Thank you 
DeepthiDeepthi (Salesforce Developers) 
Hi Rubal,

It can be possible by Force.com toolkit for Facebook. Please follow the steps in the below link to achieve you request.

Hope this helps you!
Best Regards,
Lalit Karamchandani 27Lalit Karamchandani 27
Hi Rubal,
Try this Script i hope it will work
    function closewindow() {
        appId: '{!id}',
        status: true,
        cookie: true

    function postToFeed() {
        var obj = {
            method: 'send',
            to: '{!fbuserid}',
            link: '{!$CurrentPage.URL}',
            description: 'Testing'

        function callback(response) {
            if (response['post_id']) {
                var postId = response['post_id'].split('_')[1];
                document.getElementById('msg').innerHTML = "Posted to your wall. " + "<a href=\"https://www.facebook.com/permalink.php?" + "id={!me.id}&v=wall&story_fbid=" + postId + "\">View your post</a>";
        FB.ui(obj, callback);