功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布相关的知识,希望对你有一定的参考价值。

  1. // DE La MANO CON LA D ABAJO
  2. function streamPublish(name, description, hrefTitle, hrefLink, userPrompt){
  3. FB.ui(
  4. {
  5. method: 'stream.publish',
  6. message: '',
  7. attachment: {
  8. name: name,
  9. caption: '',
  10. description: (description),
  11. href: hrefLink
  12. },
  13. action_links: [
  14. { text: hrefTitle, href: hrefLink }
  15. ],
  16. user_prompt_message: userPrompt
  17. },
  18. function(response) {
  19.  
  20. });
  21. }
  22.  
  23. //PUBLICAR CON MENSAJE
  24.  
  25. function publishStream(){
  26. 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");
  27. }
  28.  
  29. //PUBLICAR AUTOMATICAMENTE
  30. function auto_publishPost() {
  31. var publish = {
  32. method: 'stream.publish',
  33. message: 'is learning how to develop Facebook apps.',
  34. picture : 'http://www.takwing.idv.hk/facebook/demoapp_jssdk/img/logo.gif',
  35. link : 'http://www.takwing.idv.hk/facebook/demoapp_jssdk/',
  36. name: 'This is my demo Facebook application (JS SDK)!',
  37. caption: 'Caption of the Post',
  38. description: 'It is fun to write Facebook App!',
  39. actions : { name : 'Start Learning', link : 'http://www.takwing.idv.hk/tech/fb_dev/index.php'}
  40. };
  41.  
  42. FB.api('/me/feed', 'POST', publish, function(response) {
  43. document.getElementById('confirmMsg').innerhtml =
  44. 'A post had just been published into the stream on your wall.';
  45. });
  46. };
  47.  
  48.  
  49. // UPDATE ESTATUS 1
  50. function updateStatus(){
  51. var status = document.getElementById('status').value;
  52.  
  53. $.ajax({
  54. type: "POST",
  55. url: "<?php echo $fbconfig['baseUrl'];?>pb_ajax.php",
  56. data: "status=" + status,
  57. success: function(msg){
  58. alert(msg);
  59. },
  60. error: function(msg){
  61. alert(msg);
  62. }
  63. });
  64. }
  65.  
  66. //UPDATE ESTATUS 2
  67. function updateStatusViajavascriptAPICalling(){
  68. var status = document.getElementById('status').value;
  69. FB.api('/me/feed', 'post', { message: status }, function(response) {
  70. if (!response || response.error) {
  71. alert('Ha ocurrido un error');
  72. } else {
  73. alert('El estado se actualizo correctamente.');
  74. }
  75. });
  76. }

以上是关于功能FACEBOOK,PUBLICAR EN EL MURO,实现状态,自动发布的主要内容,如果未能解决你的问题,请参考以下文章

Llamar el post缩略图en el模板Wordpress 2.9

PHP Llamar el post thumbnail en el template Wordpress 2.9

text Viajes en el tiempo

php CSS en el admin

HTML meta para que se vea bien el texto en el iPhone

css 颜色鲣鱼en la barra de facebook