功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布相关的知识,希望对你有一定的参考价值。
// DE La MANO CON LA D ABAJO function streamPublish(name, description, hrefTitle, hrefLink, userPrompt){ FB.ui( { method: 'stream.publish', message: '', attachment: { name: name, caption: '', description: (description), href: hrefLink }, action_links: [ { text: hrefTitle, href: hrefLink } ], user_prompt_message: userPrompt }, function(response) { }); } //PUBLICAR CON MENSAJE function publishStream(){ streamPublish("Stream Publish", 'Thinkdiff.net is AWESOME. I just learned how to develop Iframe+Jquery+Ajax base facebook application development. ', 'Checkout the Tutorial', 'http://wp.me/pr3EW-sv', "Demo Facebook Application Tutorial"); } //PUBLICAR AUTOMATICAMENTE function auto_publishPost() { var publish = { method: 'stream.publish', message: 'is learning how to develop Facebook apps.', picture : 'http://www.takwing.idv.hk/facebook/demoapp_jssdk/img/logo.gif', link : 'http://www.takwing.idv.hk/facebook/demoapp_jssdk/', name: 'This is my demo Facebook application (JS SDK)!', caption: 'Caption of the Post', description: 'It is fun to write Facebook App!', }; FB.api('/me/feed', 'POST', publish, function(response) { 'A post had just been published into the stream on your wall.'; }); }; // UPDATE ESTATUS 1 function updateStatus(){ var status = document.getElementById('status').value; $.ajax({ type: "POST", url: "<?php echo $fbconfig['baseUrl'];?>pb_ajax.php", data: "status=" + status, success: function(msg){ alert(msg); }, error: function(msg){ alert(msg); } }); } //UPDATE ESTATUS 2 var status = document.getElementById('status').value; FB.api('/me/feed', 'post', { message: status }, function(response) { if (!response || response.error) { alert('Ha ocurrido un error'); } else { alert('El estado se actualizo correctamente.'); } }); }
以上是关于功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布的主要内容,如果未能解决你的问题,请参考以下文章
Llamar el post缩略图en el模板Wordpress 2.9
PHP Llamar el post thumbnail en el template Wordpress 2.9