; ( ), .
FB.init({appId: "xxxxxxxxxxx", status: true, cookie: true});
function fbShare(pic) {
event.preventDefault();
var obj = {
method: 'feed',
link: 'http://localhost/users/#/gingles/1680/',
picture: 'http://c711249.r49.cf2.rackcdn.com/thumbs/1680_19.png',
name: 'gingle social transparancy',
caption: __video.title,
redirect_uri: 'http://www.gingle.tv/close-page',
description: 'Watch this video on gingle.tv',
};
function callback(response) {
console.log(response);
}
FB.ui(obj, callback);
}
, share
( )
, facebook, .
, URL- , . FB.ui URL- .
var fbUrl = 'https://www.facebook.com/dialog/feed?app_id=xxxxxxxxxxx&' +
'link=http://' + encodeURIComponent(window.location.host + '/users/#/' + __video.username + '/' + __video.id) + '&picture=' + $(this).find('img').attr('src') +
'&name=gingle%20|%20social%20transparency&' + 'caption=' + __video.title +
'&description=Watch%20this%20ideo%20on%20gingle.tv&' +
'redirect_uri=http://www.gingle.tv/close-page';
$('#screenshot_social').html('<a href="' + fbUrl + '" target=_blank>Share on Facebook</a>');
.