Created
September 25, 2011 17:26
-
-
Save quard8/1240867 to your computer and use it in GitHub Desktop.
facebook post action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| } | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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