Facebook Share Feed Dialog only working for Admins -
after creating facebook app, leaving in sandbox , attempting setup share button using feed dialog, seems fb accounts i've added admins able use share button - other non-admins able see feed dialog popup, seeing "an error occurred, please try again.".
i thought browser specific issue seems dependant on fb accounts relationship app. person non-admin has been testing app , unable share @ all.
i using wordpress cms backend app. far can tell app id , app url correct, difference being on dev environment moved clients production fb page once working.
i find bizarre works excellent provided admin of page. possible sandbox thing?
i checked trying use share button when logged in page opposed issue, , not (if wondering).
i believe using sdk/api , feed dialog correctly, code reference:
header.php
<div id="fb-root"></div> <script src="https://connect.facebook.net/en_us/all.js"></script> <script type="text/javascript"> // called when fb sdk has been loaded window.fbasyncinit = function () { // auto resize fb canvas fb.canvas.setsize({height:600}); settimeout("fb.canvas.setautogrow()",500); }; // load fb sdk asynchronously (function (d) { var js, id = 'facebook-jssdk'; if (d.getelementbyid(id)) { return; } js = d.createelement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_us/all.js"; d.getelementsbytagname('head')[0].appendchild(js); } (document)); </script>
footer.php
<script type="text/javascript"> fb.init({ appid: '515010801895800', status: true, cookie: true, xfbml: true }); function posttofeed() { var obj = { method: 'feed', display: 'popup', picture: '<?php echo get_template_directory_uri(); ?>/images/app/app-icon-75.png', name: 'suncorp brighter futures heroes', caption: '', link: 'https://www.facebook.com/aaronlepikdev/app_515010801895800', description: 'suncorp brighter futures heroes place our people come share stories, raise money, volunteer , apply grants causes close hearts.', actions: {name: 'suncorp brighter futures heroes', link: 'https://www.facebook.com/aaronlepikdev/app_515010801895800'} }; function callback(response) { document.getelementbyid('msg').innerhtml = "post id: " + response['post_id']; } fb.ui(obj, callback); } </script>
any @ appreciated.
it seems indeed may have answered own question - have removed sandbox , seems working. did stumble across though: sandbox mode - please note when app in sandbox mode, cannot call api calls on behalf of users cannot see app.
Comments
Post a Comment