Facebook PHP publish watches action -


i want add facebook open graph feature website. created action (watch) (video). have set meta tags so:

<meta property="og:title" content="title"/> <meta property="og:type" content="namespace:video"/> <meta property="og:url" content="http://www.zzz.com/images.php?i=something"/> <meta property="og:image" content="http://www.zzz.com/thumbnails/images.png"/> <meta property="og:site_name" content="site name"/> <meta property="fb:app_id" content="xxxxxxxxxxx"/> <meta property="fb:admins" content="xxxxxxxxxxxx"/> <meta property="og:description" content="desc"/> 

i using php sdk authenticate users , on videos page want publish users actions so:

require_once('scripts/facebook.php'); $config = array('appid' => 'xxxxxx','secret' => 'xxxxxxx'); $facebook = new facebook($config); $facebook_user = $facebook->getuser(); $facebook_message = array('message'=>$image_caption, 'link'=>'www.zzz.com/videos.php?i='.$video_name.''); if($facebook->getuser()){ try{ $access_token = $facebook->getaccesstoken(); $params = array('video'=>'http://www.zzz.com/','access_token'=>$access_token); $publish = $facebook->api('/me/namespace:watch','post',$params); }catch(facebookapiexception $e) { error_log($e->gettype()); error_log($e->getmessage()); } } 

anyway when run code nothing happening? please tell me if wrong somewhere or if missing

you canĂ¢€™t have custom watch actions more, have use build-in one.

https://developers.facebook.com/docs/opengraph/actions/builtin/#watch


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -