Callback if the user has shared the page (vk, fb, od, tw)?

0 like 0 dislike
There is a desire to encourage user all sorts of buns if he shared a page in one of social networks: Vkontakte, Facebook, Odnoklassniki, Twitter.
Preferably the variant, if you can, via the API.
Maybe there's a third-party service helping to implement it?
by | 14 views

2 Answers

0 like 0 dislike
Good day! I have the same question. Would like to find out how to make colback when sharinga in the VC. With Facebook it's very simple. They have the documentation in the example is done, colback when sharinga.
You got from VC? Please tell me how to do.

Below is an example of Kabaka in FB
\r\rwindow.fbAsyncInit = function() {\rFB.init({\rappId      : 445457008923933,\rstatus     : true,\rxfbml      : false\r});\r};\rfunction popup(){\rFB.ui(\r{\rmethod: 'feed',\rname: 'name - Тестим',\rcaption: 'Какой-то caption',\rdescription: 'ДАДАДАДАДАДААДАДДА',\rlink: ''\r},\rfunction(response) {\rif (response && response.post_id) {\ralert('Молодец!');\r} else {\ralert('плохо =(');\r}\r}\r);\r\r}\r\r\r\r\rbody,html {\rposition: relative;\rheight: 100%;\rwidth: 100%;\r}\r.fb-like {\rposition: absolute;\rmargin: auto;\rleft: 0;\rtop: 0;\rbottom: 0;\rright: 0;\rheight: 400px;\rwidth: 400px;\rbackground: red;\rcolor: white;\rfont-size: 30px;\rcursor: pointer;\r}\r\r\r(function(d, s, id){\rvar js, fjs = d.getElementsByTagName(s)[0];\rif (d.getElementById(id)) {return;}\rjs = d.createElement(s); = id;\rjs.src = "//";\r// uncomment on production\r// js.src = "//";\rfjs.parentNode.insertBefore(js, fjs);\r}(document, 'script', 'facebook-jssdk'));\r\r Click rassure!
0 like 0 dislike
C vk all even easier than fb:

... \r\rVK.init({apiId: ваш_appId, onlyWidgets: true});\r\r\r... \r\rVK.Widgets.Like("vk_like", {type: "button"});\rVK.Observer.subscribe("", function f() {\ralert('Молодец!');\r});\r

Related questions

110,608 questions
257,186 answers
32,727 users