خرید بک لینک

Vote count: 0

I want to have a "facebook share" link or button on a web page. The idea is to to share a link and a brief description, identical to twiter. No image or title of page is needed

In the past, the following link worked:- "http://www.facebook.com/sharer.php?u=" + complete_url + message

Now, facebook ignores the message and it discards the complete url link. Instead it only displays the title of the homepage.

I found this answer on stack overflow:- Make my own custom Facebook share button.

Having tried it (the script below) - I get the error: 'FB' is undefined

I'd be grateful if you could tell me:- 1. what am I doing wrong? 2. do we have to download the sdk.js from facebook server everytime?

The script is like this:

            <html><head>
            <script>
            function onClick() {
                    FB.ui({
                        method: 'share',
                        href: 'the_complete_url_to_specific_page'
                    });
                }

                window.fbAsyncInit = function() {
                    FB.init({
                        appId      : 'my_facebook_id',
                        xfbml      : true,
                        version    : 'v2.3'
                    });
                };

                (function(d, s, id){
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) {retu;}
                    js = d.createElement(s); js.id = id;
                    js.src = "//coect.facebook.net/en_US/sdk.js";
                    fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));
            </script>
            </head>
            <body>

            <a href='#' onclick='onClick() ;retu false;'> share on FacebookR</a>

            </body>
            </html>

Thanks

asked 3 mins ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 11 اسفند 1394 ساعت: 3:01

صفحه بندی