Cum ºtiu daca un "share" pe facebook s-a efectuat cu succes?
Last Updated: Jun 29 2014 16:14, Started by
Ivy2007
, Jun 29 2014 15:27
·
0

#1
Posted 29 June 2014 - 15:27

Salutare,
Dilema mea se află în titlul acestui topic aşa că încep direct. Am căutat prin documentaţia facebook şi am făcut următorul script: window.fbAsyncInit = function() { FB.init({ appId : 'id app', status : true, xfbml : true, version : 'v2.0', }); }; (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_GB/sdk.js#xfbml=1&appId=id ipp&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <script> function test() { FB.ui( { method: 'share', href: 'http://127.0.0.1/face/test.php' }, function(response) { if (response && !response.error_code) { alert('Posting completed.'); } else { alert('Error while posting.'); } } ); } <a class="fb-share-button" data-href="[url="http://127.0.0.1/face/test.php"]http://127.0.0.1/face/test.php"[/url] data-type="button" onclick="test()" >Share</a> Problema este că nu funcţionează. Şi n-am nici cea mai vagă idee de ce (nu prea mă pricep la java, dar altă soluţie nu e din câte am văzut). Mă puteţi ajuta? După ce popup-ul de la facebook este deschis vreau să ştiu dacă utilizatorul apasă "Share this" sau "Cancel". Mulţumesc! Edited by Ivy2007, 29 June 2014 - 15:28. |
#3
Posted 29 June 2014 - 16:14

Dar poţi să afli. Întreabarea e cum? De aflat sigur se poate afla.
|
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users