简体   繁体   中英

Post to my timeline in Facebook

Please suggest how to post some text which is entered by an end user after clicking on a button. I searched in social plugins of Facebook. I found share plugin but it is sharing only links but not the text. How can I post the text to Facebook? In my application, I'm using normal "textarea" to enter the text/status and I'm using a submit button to post it. I want to post the entered text to my timeline in Facebook. Is there any plugin available for this? Please suggest.

Thanks, Dinakar.

Using Javascript SDK

<script>
        function share()
        {
            var obj = {
              method: "feed",
              link: "Facebook page hyperlink",
              picture: "Picture hyperlink",
              name: "Title",
              caption: "A short caption right below the title",
              description: "Description"
            };

            function callback(response) {
              document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
            }

            FB.ui(obj, callback);
        }
</script>

For More info: http://developers.facebook.com/docs/reference/dialogs/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM