Facebook FB.api post how to specify a target

Posted by Laurent Luce on Stack Overflow See other posts from Stack Overflow or by Laurent Luce
Published on 2010-08-11T03:07:30Z Indexed on 2011/11/14 1:50 UTC
Read the original article Hit count: 193

Filed under:
|
|
|
|

I am using FB.api OpenGraph to post a message on the user's wall. I would like the link target to be equal to '_blank' so it opens in a new tab. Is it possible ? The Facebook documentation doesn't give much details.

  var params = {};

  params['message'] = 'message';
  params['name'] = 'name';
  params['link'] = 'http://link';
  params['picture'] = 'http://picture';
  params['description'] = 'description';

  FB.api('/me/feed', 'post', params, function(response) {
    if (!response || response.error) {
      alert('Error occured');
    } else {
      alert('Post ID: ' + response);
    }
  });

© Stack Overflow or respective owner

Related posts about api

Related posts about facebook