이 작업을 수행하려면 global events에 가입 할 수 있습니다.
당신이 auth.login, auth.authResponseChange, 또는 사용자가 'add-to-timeline'를 통해 응용 프로그램을 승인 된 후 그들이 호출됩니다 auth.statusChange에 가입 한 경우.
그래서 예를 들어, 당신은 ...이 작업을 수행 할 수
FB.Event.subscribe('auth.login', function(response) {
alert('The user has just authorized your application');
});
내가 당신이 원하는 것은 작업이 사용자를 클릭 한 후 타임 라인에 추가하는 것입니다 내가 원하는 같은 일입니다 같은데요 그러나 처음으로 '타임 라인에 추가'를 클릭 한 다음 사이트를 계속 방문하면 타임 라인에 자동으로 추가됩니다.
은 ... 당신이 할 것이라고 수행
/** put your FB.init right here **/
FB.Event.subscribe('auth.statusChange', function(response) {
if (response.status == 'connected') {
FB.api("/me/foobar:watch" + "?video=http://foobar.com/video/123","post",
function(response) {
if (!response || response.error) {
alert("Error");
} else {
alert("Post was successful! Action ID: " + response.id);
}
});
}
});