Facebook application, dialogue for publishing on the user's wall, using javascript api, pop-up blocking in browsers

I use the JS-API to create a dialog that asks for permission to publish a status message generated by my Application. Below is a screenshot of what I'm saying: THE POP-UP which gets blocked by browsers

here is the code:

FB.ui(
   {
     method: 'feed',
     name: 'Facebook Dialogs',
     link: 'http://developers.facebook.com/docs/reference/dialogs/',
     picture: 'http://fbrell.com/f8.jpg',
     caption: 'Reference Documentation',
     description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
     message: 'Facebook Dialogs are easy!'
   },
   function(response) {
     if (response && response.post_id) {
       alert('Post was published.');
     } else {
       alert('Post was not published.');
     }
   }
 );

I use a sample JS code, as stated in the documentation, and it works well if the pop-ups are not blocked in the browser settings. but without displaying the status of the message, there is no application usefulness! Please help them get stuck in the last step. thank!!

+3
source share
3 answers

, . FACEBOOK, !

, , . .

, , Facebook, :

http://www.facebook.com/dialog/feed?
  app_id=123050457758183&
  link=http://developers.facebook.com/docs/reference/dialogs/&
  picture=http://fbrell.com/f8.jpg&
  name=Facebook%20Dialogs&
  caption=Reference%20Documentation&
  description=Dialogs%20provide%20a%20simple,%20consistent%20interface%20for%20applications%20to%20interact%20with%20users.&
  message=Facebook%20Dialogs%20are%20so%20easy!&
  redirect_uri=http://www.example.com/response

app_id redirect_uri, :

...
previous code
...
inside previous code success response
...
var url = "http://www.facebook.com/dialog/feed?" +
            "app_id=" + YOUR_APP_ID + "&" +
            "link=http://developers.facebook.com/docs/reference/dialogs/&" +
            "picture=http://fbrell.com/f8.jpg&" +
            "name=Facebook%20Dialogs&" +
            "caption=Reference%20Documentation&" +
            "description=Dialogs%20provide%20a%20simple,%20consistent%20interface%20for%20applications%20to%20interact%20with%20users.&" +
            "message=Facebook%20Dialogs%20are%20so%20easy!&" +
            "redirect_uri=" + YOUR_REDIRECT_URI;
top.location.href = url;
+3

. . . <div id="fb-root"></div>? , <body>.

, SDB Javascript SDK:

<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
+1

Use this code you forgot to add a display property

FB.ui(
   {
     method: 'feed',
     display: 'popup',
     name: 'Facebook Dialogs',
     link: 'http://developers.facebook.com/docs/reference/dialogs/',
     picture: 'http://fbrell.com/f8.jpg',
     caption: 'Reference Documentation',
     description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
     message: 'Facebook Dialogs are easy!'
   },
   function(response) {
     if (response && response.post_id) {
       alert('Post was published.');
     } else {
       alert('Post was not published.');
     }
   }
 );
0
source

All Articles