FBのjs sdkを介して「いいね」アクションをトリガーするための正しい構文は何ですか? カスタム アクションは次のようになります。
FB.api('/me/recipebox:cook', 'post',
{ recipe : 'http://www.example.com/pumpkinpie.html' });
によると:https://developers.facebook.com/docs/opengraph/actions/#create
編集 - これは私が最終的に使用したものです:
$("#testLink").click(function(){
$.post("https://graph.facebook.com/<?php echo $user_profile[id]; ?>/og.likes",
{
access_token: FB.getAuthResponse()['accessToken'],
object: "http://www.matrym.com/fb/temp.php"
},
function(data) {
alert("Data Loaded: " + data);
}
);
});