0

This is driving me crazy... I am trying to use the Facebook's open graph to publish actions from my webiste to the user's wall. The verb is "watch" and the object is "video".

This is my meta tags:

<meta property="fb:app_id" content="111" />
<meta property="og:type" content="video.other" /> 
<meta property="og:url" content="http://www.111.com/videos.php?v=<?php echo $name;?>">
<meta property="og:image" content="http://www.111.com/thumbnails/<?php echo $name;?>.png">
<meta property="og:title" content="<?php echo $caption;?>">
<meta property="og:description" content="111">
<meta property="fb:admins" content="111">
<meta property="og:site_name" content="111">

This is my php code:

//facebook
    require_once('scripts/facebook.php');
    $config = array('appId' => '111', 'secret' => '111');
    $params = array('scope'=>'publish_actions');
    $facebook = new Facebook($config);
    $user = $facebook->getUser();

    $login_url = $facebook->getLoginUrl($params);
    $logoutUrl = $facebook->getLogoutUrl();
    if($user){

        try{
            $params = array('video'=>'http://www.111.com/videos.php?v='.$name);
            $out = $facebook->api('/me/video.watches','post',$params);
            }catch(Exception $e){
                echo $e->getMessage().'<br>';
                }
}  

When I run the above code, I get this error:

(#3502) Object at URL http://www.111.com/videos.php?v=111 has og:type of 'website'. The property 'video' requires an object of og:type 'video.other'.

I tried using the debug tool with this url and I found no problem with it. As you can see I have video.other for og:type So it make no sence why I am getting this error. Any one know what I am doing wrong here. I already was able to publish an action to my wall using Graph API Explorer tool by facebook but not with my php code.

4

1 回答 1

0

所以我把东西留在原样,2小时后回来,一切都很好。

于 2013-01-20T15:46:24.757 回答