Skip to content

Instantly share code, notes, and snippets.

@quard8
Created September 25, 2011 17:26
Show Gist options
  • Select an option

  • Save quard8/1240867 to your computer and use it in GitHub Desktop.

Select an option

Save quard8/1240867 to your computer and use it in GitHub Desktop.
facebook post action
function post()
{
FB.api('/me/<ВАШ NAMESPACE>:listen' +
'?song=<ССЫЛКА НА СТРАНИЦУ>','post',
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post was successful! Action ID: ' + response.id);
}
});
}
<a href="#" class="btn" onclick="post();">Отправить</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment