{"id":925,"date":"2014-07-02T19:42:15","date_gmt":"2014-07-02T22:42:15","guid":{"rendered":"http:\/\/www.viazap.com.br\/?p=925"},"modified":"2014-07-02T19:42:15","modified_gmt":"2014-07-02T22:42:15","slug":"publicar-no-facebook-as-postagens-do-wordpress","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=925","title":{"rendered":"Publicar no Facebook as postagens do WordPress"},"content":{"rendered":"<p style=\"color: #414141;\">Ol\u00e1 a todos!<\/p>\n<p style=\"color: #414141;\">Neste tutorial ensinarei como vincular o seu site em WordPress a um perfil ou uma p\u00e1gina do Facebook, de forma que qualquer conte\u00fado postado no site seja automaticamente publicado no Facebook.<\/p>\n<p style=\"color: #414141;\">Antes de come\u00e7ar, vejamos algumas vantagens da utiliza\u00e7\u00e3o desse mecanismo:<\/p>\n<ol style=\"color: #414141;\">\n<li style=\"font-weight: inherit; font-style: inherit;\">Elimina\u00e7\u00e3o da necessidade de copiar e colar o que foi feito no site para divulgar no Facebook. Este processo \u00e9 feito automaticamente pelo plugin;<\/li>\n<li style=\"font-weight: inherit; font-style: inherit;\">Seu site estar\u00e1 sempre sendo divulgado no Facebook, desde que voc\u00ea poste conte\u00fados regularmente.<\/li>\n<\/ol>\n<p style=\"color: #414141;\">Vamos ao que interessa, sem mais delongas! O primeiro passo \u00e9 acessar o painel de administra\u00e7\u00e3o do WordPress e instalar o plugin\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Facebook Page Publish<\/span>. Veja a imagem a seguir:<!--more--><\/p>\n<p><a class=\"cboxElement\" style=\"font-weight: inherit; font-style: inherit; color: #272626;\" title=\"Instalando o Facebook Page Publish\" href=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_1.png\" rel=\"lightbox[2169]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2174\" style=\"font-weight: inherit; font-style: inherit;\" title=\"Instalando o Facebook Page Publish\" src=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_1-300x196.png\" alt=\"Instalando o Facebook Page Publish\" width=\"300\" height=\"196\" \/><\/a><\/p>\n<p style=\"color: #414141;\">Ao finalizar a instala\u00e7\u00e3o, ative o plugin (aparecer\u00e1 essa op\u00e7\u00e3o imediatamente ap\u00f3s a instala\u00e7\u00e3o) e, em seguida, ainda no painel de administra\u00e7\u00e3o, acesse\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Configura\u00e7\u00f5es &gt; Facebook Page Publish<\/span>.<\/p>\n<p><a class=\"cboxElement\" style=\"font-weight: inherit; font-style: inherit; color: #272626;\" title=\"Configura\u00e7\u00e3o do plugin Facebook Page Publish\" href=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_2.png\" rel=\"lightbox[2169]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2176\" style=\"font-weight: inherit; font-style: inherit;\" title=\"Configura\u00e7\u00e3o do plugin Facebook Page Publish\" src=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_2-276x300.png\" alt=\"Configura\u00e7\u00e3o do plugin Facebook Page Publish\" width=\"276\" height=\"300\" \/><\/a><\/p>\n<p style=\"color: #414141;\">Agora devemos configurar 3 itens:<\/p>\n<ol style=\"color: #414141;\">\n<li style=\"font-weight: inherit; font-style: inherit;\">Fazer com que o plugin consiga se conectar ao Facebook (<span style=\"font-weight: inherit; font-style: inherit;\">Facebook Connection<\/span>);<\/li>\n<li style=\"font-weight: inherit; font-style: inherit;\">Escolher o perfil ou p\u00e1gina do Facebook para a qual as postagens do site ser\u00e3o encaminhadas, determinando tamb\u00e9m quais as categorias de posts far\u00e3o parte desse encaminhamento (<span style=\"font-weight: inherit; font-style: inherit;\">Publishing<\/span>);<\/li>\n<li style=\"font-weight: inherit; font-style: inherit;\">Personalizar a apar\u00eancia da publica\u00e7\u00e3o no Facebook (<span style=\"font-weight: inherit; font-style: inherit;\">Customization<\/span>).<\/li>\n<\/ol>\n<p style=\"color: #414141;\">Para permitir uma conex\u00e3o ao Facebook, devemos criar um aplicativo atrav\u00e9s do painel de desenvolvedores do Facebook:\u00a0<a style=\"font-weight: inherit; font-style: inherit; color: #272626;\" href=\"https:\/\/developers.facebook.com\/apps\">https:\/\/developers.facebook.com\/apps<\/a>. Se voc\u00ea n\u00e3o \u00e9 cadastrado como desenvolvedor, dever\u00e1 se cadastrar (n\u00e3o explicarei esta etapa porque est\u00e1 fora do escopo do tutorial). Ao acessar o link e clicar em\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Criar Novo Aplicativo<\/span>, voc\u00ea dever\u00e1 escolher um nome para seu aplicativo e clicar em \u201cContinuar\u201d.<\/p>\n<p><a class=\"cboxElement\" style=\"font-weight: inherit; font-style: inherit; color: #272626;\" title=\"Cria\u00e7\u00e3o de Aplicativo do Facebook\" href=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_3.png\" rel=\"lightbox[2169]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2180\" style=\"font-weight: inherit; font-style: inherit;\" title=\"Cria\u00e7\u00e3o de Aplicativo do Facebook\" src=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_3-300x98.png\" alt=\"Cria\u00e7\u00e3o de Aplicativo do Facebook\" width=\"300\" height=\"98\" \/><\/a><\/p>\n<p style=\"color: #414141;\">Assim que fizer isso, aparecer\u00e1 uma p\u00e1gina com as informa\u00e7\u00f5es do seu novo aplicativo. Nesta tela, voc\u00ea dever\u00e1 habilitar a op\u00e7\u00e3o\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Website with Facebook Login<\/span>, preencher com a URL do seu site e clicar em \u201cSalvar Altera\u00e7\u00f5es\u201d. Ap\u00f3s isso, copie as informa\u00e7\u00f5es\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Application ID (App ID)\u00a0<\/span>e\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Application Secret (App Secret).\u00a0<\/span>Veja as partes destacadas em verde na imagem abaixo:<\/p>\n<p><a class=\"cboxElement\" style=\"font-weight: inherit; font-style: inherit; color: #272626;\" title=\"Informa\u00e7\u00f5es do Aplicativo Facebook\" href=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_4.png\" rel=\"lightbox[2169]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2184\" style=\"font-weight: inherit; font-style: inherit;\" title=\"Informa\u00e7\u00f5es do Aplicativo Facebook\" src=\"http:\/\/www.criacaodesitessalvador.com.br\/blog\/wp-content\/uploads\/2012\/08\/facebook_wordpress_4-300x235.png\" alt=\"Informa\u00e7\u00f5es do Aplicativo Facebook\" width=\"300\" height=\"235\" \/><\/a><\/p>\n<p style=\"color: #414141;\">Copie essas informa\u00e7\u00f5es do seu aplicativo e coloque nas configura\u00e7\u00f5es do plugin do WordPress, e em seguida clique em \u201c<span style=\"font-weight: inherit; font-style: inherit;\">Grant access rights\u201d<\/span>. Ao clicar em \u201cGrant access rights\u201d, voc\u00ea simplesmente precisar\u00e1 dar algumas permiss\u00f5es de acesso no Facebook (aquelas permiss\u00f5es que os outros aplicativos pedem, como postar em seu nome, ver seu perfil, etc. Basta confirmar.)<\/p>\n<p style=\"color: #414141;\"><span style=\"font-weight: inherit; font-style: inherit; color: #ff0000;\"><span style=\"font-weight: inherit; font-style: inherit;\">NOTA IMPORTANTE:\u00a0<\/span><span style=\"font-weight: inherit; font-style: inherit; color: #000000;\">a vers\u00e3o atual do plugin est\u00e1 com um probleminha relacionado a uma atualiza\u00e7\u00e3o da API do Facebook. Se voc\u00eas se depararem com um erro de permiss\u00f5es parecido com este: (Some or all access permissions are missing. Please click the button Grant access rights! and authorize the plugin to post to your Facebook profile or page.\u00a0[Error occured at line 774]) mesmo depois de ter autorizado as permiss\u00f5es dentro do Facebook, ser\u00e1 necess\u00e1rio modificar duas linhas do c\u00f3digo do plugin. O arquivo a ser modificado \u00e9 o\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">wp-content\/plugins\/facebook-page-publish\/<span style=\"font-weight: inherit; font-style: inherit;\">fpp_index.php<\/span><\/span>\u00a0e as linhas que dever\u00e3o ser mudadas s\u00e3o:<\/span><\/span><\/p>\n<ol style=\"color: #414141;\">\n<li style=\"font-weight: inherit; font-style: inherit;\">Linha 663: mudar de<br \/>\n$permissions = array(\u2018offline_access\u2019, \u2018share_item\u2019);<br \/>\npara<br \/>\n$permissions = array(\u2018share_item\u2019);<\/li>\n<li style=\"font-weight: inherit; font-style: inherit;\">Linha 594: mudar de<br \/>\npreg_match(\u2018\/^.+=\\s*(.+)\/\u2019, $access_token_url, $matches);<br \/>\npara<br \/>\npreg_match(\u2018\/access_token=(.*)&amp;expires\/\u2019, $access_token_url, $matches);<\/li>\n<\/ol>\n<p style=\"color: #414141;\">Essa mudan\u00e7a remove a permiss\u00e3o de acesso offline. Para mais informa\u00e7\u00f5es, ver:<a style=\"font-weight: inherit; font-style: inherit; color: #272626;\" href=\"https:\/\/developers.facebook.com\/roadmap\/offline-access-removal\/\">https:\/\/developers.facebook.com\/roadmap\/offline-access-removal\/<\/a><\/p>\n<p style=\"color: #414141;\">Estamos perto de finalizar! O passo seguinte \u00e9 definir nas configura\u00e7\u00f5es do plugin onde as postagens ser\u00e3o publicadas. Ao garantir as permiss\u00f5es de acesso, automaticamente aparecer\u00e3o op\u00e7\u00f5es no item\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Publishing<\/span>das configura\u00e7\u00f5es e voc\u00ea poder\u00e1 escolher uma delas e salvar. O seu perfil do Facebook, por exemplo, j\u00e1 estar\u00e1 l\u00e1. Caso voc\u00ea queira publicar em uma p\u00e1gina, crie-a primeiro no Facebook e depois volte \u00e0s configura\u00e7\u00f5es do plugin que a op\u00e7\u00e3o estar\u00e1 l\u00e1.<\/p>\n<p style=\"color: #414141;\">Ap\u00f3s definir para onde as postagens ir\u00e3o, voc\u00ea tamb\u00e9m poder\u00e1 escolher quals(is) categoria(s) de post dever\u00e1(\u00e3o) ser levadas do site ao Facebook.<\/p>\n<p style=\"color: #414141;\">Finalmente, no item\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Customization<\/span>, voc\u00ea poder\u00e1 personalizar o que ir\u00e1 para o Facebook, como o thumbnail do post, o resumo, o autor, entre outras configura\u00e7\u00f5es. Essa parte \u00e9 bem intuitiva: basta marcar\/desmarcar o que desejar e pronto!<\/p>\n<p style=\"color: #414141;\">Ap\u00f3s realizar tudo isso, seu site dever\u00e1 estar apto a publicar automaticamente os conte\u00fados no Facebook. Agora, em cada post que voc\u00ea criar, haver\u00e1 acima do bot\u00e3o\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Publicar<\/span>\u00a0a op\u00e7\u00e3o\u00a0<span style=\"font-weight: inherit; font-style: inherit;\">Publish to Facebook.\u00a0<\/span>Teste e verifique se est\u00e1 tudo funcionando!<\/p>\n<p style=\"color: #414141;\">Finalizo aqui este tutorial. Qualquer d\u00favida, fiquem \u00e0 vontade para perguntar nos coment\u00e1rios!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 a todos! Neste tutorial ensinarei como vincular o seu site em WordPress a um perfil ou uma p\u00e1gina do Facebook, de forma que qualquer conte\u00fado postado no site seja automaticamente publicado no Facebook. Antes de come\u00e7ar, vejamos algumas vantagens da utiliza\u00e7\u00e3o desse mecanismo: Elimina\u00e7\u00e3o da necessidade de copiar e colar o que foi feito [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[42],"tags":[648,647],"class_list":["post-925","post","type-post","status-publish","format-standard","hentry","category-leitura-recomendada","tag-as-postagens-do-wordpress","tag-publicar-no-facebook"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=925"}],"version-history":[{"count":1,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/925\/revisions"}],"predecessor-version":[{"id":926,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/925\/revisions\/926"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}