//Update: With help I managed to catch some errors which fixed the token issue. I ve updated the code to reflect that. The code still doesn t produce an event on the timeline though so I m leaving the question up.
原件问题:
我试图用开放图普软件制作一个简单的文字,在访问者打上这一页后,将连接到Facebook的参观网页(包括一部电影)。
I m not using a custom action and object, but the standard Watch action (https://developers.facebook.com/docs/opengraph/video/) and Video.movie object.
I came up with this based on FB s example code:
<!-- first login-button with scope publish_actions: -->
<fb:login-button show-faces="false" width="200" max-rows="1" scope="publish_actions" ></fb:login-button>
<!-- Then script that should push update to timeline: -->
<script type="text/javascript">
function fbPublish(){
FB.api(
/me/video.watches ,
post ,
{ video.movie : <?php the_permalink(); ?> ,
access_token : blablabla },
function(response) {
if (!response || response.error) {
alert( Nope. );
} else {
alert( Yes. ); // any stuff
}
});
}
这触发了Nope警报。
I have added the Watch action through curl. Any ideas as to what could be going on?