2014-11-12 2 views

답변

3

예, JavaScript SDK 및 공유 대화 상자를 사용하여 가능합니다. 예를 들어 링크를 공유하지만 맞춤 이미지, 이름 및 캡션을 사용하여 다음 작업을 수행 할 수 있습니다. 기본적으로 내 페이지의 모든 OG 데이터를 덮어 씁니다. 당신은 페이스 북의 승인을 publish_actions 권한이있는 경우

function fb_share() { 
    FB.ui({ 
     method: 'feed', 
     name: "Facebook API: Tracking Shares using the JavaScript SDK", 
     link: "https://www.webniraj.com/2013/05/11/facebook-api-tracking-shares-using-the-javascript-sdk/", 
     picture: "https://stackexchange.com/users/flair/557969.png", 
     caption: "Tracking Facebook Shares on your website or application is a useful way of seeing how popular your articles are with your readers. In order to tracking Shares, you must used the Facebook JavaScript SDK." 
    }, function(response) { 
     // do nothing 
    }); 

} 

$(document).ready(function(){ 
    $('button.share-btn').on('click', fb_share); 
}); 

당신은 PHP에서 같은 일을 할 수 있습니다.

enter image description here

Source

: 모두 다음과 같은 결과를 얻을 것이다