Faced the problem of checking whether the user shared a post or not.

There are links with the help of which we share the record:

ВК - http://vk.com/share.php?url=сайт ФБ - https://www.facebook.com/sharer/sharer.php?u= сайт ОД - http://www.odnoklassniki.ru/dk?st.cmd=addShare&st._surl= сайт 

That already did not do, but nothing works. Did as in this post How to track the result of clicking on the "Share" button VK / Facebook / Twitter? but the result did not give. ON on click hung up function:

  $('#fblink').on('click',function(){ FB.ui({ method: 'share', link: 'сайт', }, function(response){alert(response)}); }); 

But it says that app_Id needs to be specified, although I specify it as shown in the off-documentation:

 window.fbAsyncInit = function() { FB.init({ appId : 'code', xfbml : true, version : 'v2.5' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); 

    1 answer 1

    You first need to register your application, and from there take the Eid of the application. Do not forget that the documentation is all an example.

    • Yes, I would indicate that I have the key. But thanks for the advice anyway ) - YuriiChmil
    • then the second question, what happens in your console? - LevBazdyrev
    • In the console, purely with the exception of "Uncaught SyntaxError: Unexpected token F" is an annoying error, although I doubt that the problem is there. - YuriiChmil
    • for VK there is an interesting method vk.com/dev/wall.get - it gets all user records, by answer you can find which record you need, but there is a more compact one. vk.com/dev/wall.get - this method will search for a specific entry. For Facebook, I think it will not be difficult to figure out - LevBazdyrev
    • We 'll see, thank you - YuriiChmil