Monday, July 8, 2013

Facebook Newsfeed Popup in Laravel 4 with Javascript (or otherwise)

I am trying to have the newsfeed dialog pop up for a user that clicks on a button (to post something on their Facebook wall). I already have a logged in Facebook user that has been authenticated (using the laravel-oauth2 package and the built in Auth system with Laravel 4). However, when I run the following script, nothing happens:

<script> window.fbAsyncInit = function() {     FB.init({         appId      : 'APP_ID_HERE',             status     : true,             cookie     : true,             oauth      : true             xfbml      : true       });      $( '.opener' ).click(function() {         FB.ui({             method: 'feed',             link: 'http://example.com',             name: 'NEWSFEED',             caption: 'This is a test',             description: {{$artist->stage_name}}              });        }); };  </script> 

button:

<a class="add-list-button opener" style="color: white; font:14px / 14px 'DINMedium','Helvetica Neue',Helvetica,Arial,sans-serif;">Play my city</a> 

When I click the button, nothing happens. Do you see anything wrong with what I have here? If there is a better solution using my already authenticated user, let me know. Thank you.

Source: http://stackoverflow.com/questions/17508291/facebook-newsfeed-popup-in-laravel-4-with-javascript-or-otherwise

Mermaids New Evidence Raspberry Pi memorial day stacy keibler stacy keibler bachelorette royal caribbean

No comments:

Post a Comment