{"id":35,"date":"2024-04-20T01:50:09","date_gmt":"2024-04-19T19:50:09","guid":{"rendered":"https:\/\/datamatric.com\/blog\/?p=35"},"modified":"2024-12-17T10:58:21","modified_gmt":"2024-12-17T04:58:21","slug":"how-to-auto-post-in-facebook-page-using-graph-api","status":"publish","type":"post","link":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/","title":{"rendered":"How to auto publish post in Facebook page &#8211; using Graph API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Are you looking for how to auto publish post in Facebook Page-using Graph API? You can get all the instruction on how to auto-publish posts on the Facebook page &#8211; using Graph API by reading this blog. The Expertise of <a href=\"https:\/\/datamatric.com\/\">Data Matric<\/a> help you to publish auto-posts on your Facebook Page.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_65 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Topics Summary<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#What_are_we_going_to_achieve\" title=\"What are we going to achieve ?\">What are we going to achieve ?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#Initial_setup\" title=\"Initial setup\">Initial setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#API_Key\" title=\"API Key\">API Key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#How_to_get_find_Facebook_page_ID\" title=\"How to get \/ find Facebook page ID ?\">How to get \/ find Facebook page ID ?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#Auto_posting_code\" title=\"Auto posting code\">Auto posting code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#Publish_post_every_hour\" title=\"Publish post every hour\">Publish post every hour<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#Practical_example\" title=\"Practical example\">Practical example<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#Business_solution\" title=\"Business solution\">Business solution<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_we_going_to_achieve\"><\/span>What are we going to achieve ?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose, you have a Facebook page. But you don&#8217;t have enough time to publish thousands of posts. You want auto post in Facebook page? Yes, you can automate the process completely. A software system or bot will be posting frequently on your behalf. You just need to set which contents (Text, Image, Video etc.) you want to post automatically.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can set the interval between postings. You can post something every hour, every 2 hours or every 12 hours etc. Or even every minute, though it&#8217;s not a good idea at all.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Does it cost money ? Not a single penny !<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Anyway I will show you an example. I am giving you a <a href=\"https:\/\/www.facebook.com\/122102557712000696\" target=\"_blank\" rel=\"noreferrer noopener\">Facebook page link<\/a> which manage all their posts with the help of Facebook Graph API.<\/li>\n<\/ul>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adbd8888f4d9&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adbd8888f4d9\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"739\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/jovoc-image-acclaim.png\" alt=\"facebook page auto post example\" class=\"wp-image-84\" srcset=\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/jovoc-image-acclaim.png 694w, https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/jovoc-image-acclaim-282x300.png 282w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not only auto posting from predefined content, but also you can query database or scrape web, prepare data and then post in Facebook automatically. That will be more complex, but easy if you are an experienced developer.  The marked content in the above emails has been queried from MySQL database, then processed and then posted in Facebook page automatically<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create_app\"><span class=\"ez-toc-section\" id=\"Initial_setup\"><\/span>Initial setup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>At first, you have to create a Facebook app from <a href=\"https:\/\/developers.facebook.com\/apps\/creation\/\" target=\"_blank\" rel=\"noreferrer noopener\">Facebook developer console<\/a> . For your convenience I will give you a YouTube tutorial which shows every step comprehensively.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After you finish this video I will provide you some code sample that works seamlessly.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Facebook API Tutorial: Graph API, Access Token and Developer Documentation Explained\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/to4uTxSNo6Q?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"API_Key\"><\/span>API Key<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">From the above video you have got the  API key, please save the API key with proper security. Then we will send a Http POST request to the API URL using CURL. Notice the API URL structure:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"$url = &quot;https:\/\/graph.facebook.com\/$pageId\/photos?url=$imagePath&amp;caption=$content&amp;access_token=$accessToken&quot;;\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">$url <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">https:\/\/graph.facebook.com\/<\/span><span style=\"color: #F8F8F2\">$pageId<\/span><span style=\"color: #F1FA8C\">\/photos?url=<\/span><span style=\"color: #F8F8F2\">$imagePath<\/span><span style=\"color: #F1FA8C\">&amp;caption=<\/span><span style=\"color: #F8F8F2\">$content<\/span><span style=\"color: #F1FA8C\">&amp;access_token=<\/span><span style=\"color: #F8F8F2\">$accessToken<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">To call this API, you need the Facebook page ID. Now question is how you can find the page ID ?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_get_find_Facebook_page_ID\"><\/span>How to get \/ find Facebook page ID ?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to your Facebook page <\/li>\n\n\n\n<li> Press <strong>CTRL + U<\/strong> . This will open page source code.<\/li>\n\n\n\n<li>Press <strong>CTRL + F<\/strong> and write <strong><em>delegate_page_id<\/em><\/strong>  . Then you will find an object which looks like <\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&quot;user&quot;:{&quot;id&quot;:&quot;61550xxxx580&quot;,&quot;delegate_page_id&quot;:&quot;12210xxxx71200696&quot;}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">user<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">:{<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">id<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">61550xxxx580<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">delegate_page_id<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">12210xxxx71200696<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"> Note that searching for <strong><em>delegate_page_id<\/em><\/strong>   we&#8217;ll find multiple match. Search for next match until you find an object like this. For your convenience I am also attaching a screenshot :<br><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adbd88890619&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adbd88890619\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"121\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/Capture.png\" alt=\"how to find facebook page ID\" class=\"wp-image-128\" srcset=\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/Capture.png 629w, https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/Capture-300x58.png 300w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Auto_posting_code\"><\/span>Auto posting code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now read the code with attention:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\n\n\/**\n * Post to Facebook Page using Graph API.\n *\n * @param string $pageId The ID of the Facebook page to post to.\n * @param string $accessToken The access token with the necessary permissions.\n * @param string $content The message or caption to post.\n * @param string $imagePath The URL of the image to post (optional).\n *\n * @return mixed The API response as a JSON-decoded object or array.\n *\/\nfunction postToFacebookPage($pageId, $accessToken, $content, $imagePath = null){\n    \/\/ Encode content as URL-safe string\n    $content = urlencode($content);\n\n    \/\/ Determine the endpoint and payload\n    if ($imagePath) {\n        \/\/ If an image path is provided, post as a photo\n        $url = &quot;https:\/\/graph.facebook.com\/$pageId\/photos?url=$imagePath&amp;caption=$content&amp;access_token=$accessToken&quot;;\n    } else {\n        \/\/ Otherwise, post as a regular feed message\n        $url = &quot;https:\/\/graph.facebook.com\/$pageId\/feed?message=$content&amp;access_token=$accessToken&quot;;\n    }\n\n    \/\/ Initialize cURL session\n    $ch = curl_init();\n\n    \/\/ Set cURL options\n    curl_setopt($ch, CURLOPT_URL, $url);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_POST, true);\n\n    \/\/ Execute cURL session and capture the response\n    $response = curl_exec($ch);\n\n    \/\/ Check for cURL errors\n    if (curl_errno($ch)) {\n        throw new Exception('cURL Error: ' . curl_error($ch));\n    }\n\n    \/\/ Close cURL session\n    curl_close($ch);\n\n    \/\/ Decode JSON response and return it\n    return json_decode($response, true);\n}\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FF79C6\">&lt;?<\/span><span style=\"color: #BD93F9\">php<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * Post to Facebook Page using Graph API.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * <\/span><span style=\"color: #FF79C6\">@param<\/span><span style=\"color: #6272A4\"> <\/span><span style=\"color: #FF79C6\">string<\/span><span style=\"color: #6272A4\"> $pageId The ID of the Facebook page to post to.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * <\/span><span style=\"color: #FF79C6\">@param<\/span><span style=\"color: #6272A4\"> <\/span><span style=\"color: #FF79C6\">string<\/span><span style=\"color: #6272A4\"> $accessToken The access token with the necessary permissions.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * <\/span><span style=\"color: #FF79C6\">@param<\/span><span style=\"color: #6272A4\"> <\/span><span style=\"color: #FF79C6\">string<\/span><span style=\"color: #6272A4\"> $content The message or caption to post.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * <\/span><span style=\"color: #FF79C6\">@param<\/span><span style=\"color: #6272A4\"> <\/span><span style=\"color: #FF79C6\">string<\/span><span style=\"color: #6272A4\"> $imagePath The URL of the image to post (optional).<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> * <\/span><span style=\"color: #FF79C6\">@return<\/span><span style=\"color: #6272A4\"> <\/span><span style=\"color: #FF79C6\">mixed<\/span><span style=\"color: #6272A4\"> The API response as a JSON-decoded object or array.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"> *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FF79C6\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #50FA7B\">postToFacebookPage<\/span><span style=\"color: #F8F8F2\">($pageId, $accessToken, $content, $imagePath <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">null<\/span><span style=\"color: #F8F8F2\">){<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Encode content as URL-safe string<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    $content <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD\">urlencode<\/span><span style=\"color: #F8F8F2\">($content);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Determine the endpoint and payload<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #FF79C6\">if<\/span><span style=\"color: #F8F8F2\"> ($imagePath) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #6272A4\">\/\/ If an image path is provided, post as a photo<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        $url <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">https:\/\/graph.facebook.com\/<\/span><span style=\"color: #F8F8F2\">$pageId<\/span><span style=\"color: #F1FA8C\">\/photos?url=<\/span><span style=\"color: #F8F8F2\">$imagePath<\/span><span style=\"color: #F1FA8C\">&amp;caption=<\/span><span style=\"color: #F8F8F2\">$content<\/span><span style=\"color: #F1FA8C\">&amp;access_token=<\/span><span style=\"color: #F8F8F2\">$accessToken<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    } <\/span><span style=\"color: #FF79C6\">else<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #6272A4\">\/\/ Otherwise, post as a regular feed message<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        $url <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F1FA8C\">https:\/\/graph.facebook.com\/<\/span><span style=\"color: #F8F8F2\">$pageId<\/span><span style=\"color: #F1FA8C\">\/feed?message=<\/span><span style=\"color: #F8F8F2\">$content<\/span><span style=\"color: #F1FA8C\">&amp;access_token=<\/span><span style=\"color: #F8F8F2\">$accessToken<\/span><span style=\"color: #E9F284\">&quot;<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Initialize cURL session<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    $ch <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD\">curl_init<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Set cURL options<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #8BE9FD\">curl_setopt<\/span><span style=\"color: #F8F8F2\">($ch,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">CURLOPT_URL<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #F8F8F2\">$url);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #8BE9FD\">curl_setopt<\/span><span style=\"color: #F8F8F2\">($ch,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">CURLOPT_RETURNTRANSFER<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">true<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #8BE9FD\">curl_setopt<\/span><span style=\"color: #F8F8F2\">($ch,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">CURLOPT_POST<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">true<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Execute cURL session and capture the response<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    $response <\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD\">curl_exec<\/span><span style=\"color: #F8F8F2\">($ch);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Check for cURL errors<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #FF79C6\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #8BE9FD\">curl_errno<\/span><span style=\"color: #F8F8F2\">($ch)) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #FF79C6\">throw<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FF79C6\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD; font-style: italic\">Exception<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E9F284\">&#39;<\/span><span style=\"color: #F1FA8C\">cURL Error: <\/span><span style=\"color: #E9F284\">&#39;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD\">curl_error<\/span><span style=\"color: #F8F8F2\">($ch));<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Close cURL session<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #8BE9FD\">curl_close<\/span><span style=\"color: #F8F8F2\">($ch);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #6272A4\">\/\/ Decode JSON response and return it<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #FF79C6\">return<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #8BE9FD\">json_decode<\/span><span style=\"color: #F8F8F2\">($response,<\/span><span style=\"color: #50FA7B\"> <\/span><span style=\"color: #BD93F9\">true<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This will publish a post in Facebook on behalf of the user who allowed permission while generating API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here we have demonstrated using PHP language. But notice that we used <strong>CURL<\/strong> which can be used with any language like Python, Javascript, Java, C# (.Net), Go,  Rust, Ruby etc. Just use the <strong>CURL<\/strong> library of your favorite language. Then you can auto post in Facebook page with in language .<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Publish_post_every_hour\"><\/span>Publish post every hour<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now if you want to auto post in Facebook page like this every hour or particular period of time, you can simply use cron job. But mind that every API has a rate limit. Do not cross that limit least you should be imposed restriction from Facebook.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you face any problem feel free to comment . <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Practical_example\"><\/span>Practical example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I publish all the blog posts of <a href=\"https:\/\/mindila.xyz\/blog\" target=\"_blank\" rel=\"noreferrer noopener\">mindila.xyz\/blog<\/a> using Facebook auto-publish mechanism.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Business_solution\"><\/span>Business solution<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you need business solution regarding Facebook page, groups etc. and graph API, you can contact our company email.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking for how to auto publish post in Facebook Page-using Graph API? You can get all the instruction on how to auto-publish posts [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":102,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[7,9,11,12,4,10],"class_list":["post-35","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-marketing","category-facebook-marketing","tag-api-key","tag-auto-post-in-facebook-page","tag-data-matric","tag-facebook-api","tag-facebook-developer-console","tag-graph-api"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to auto publish post in Facebook page - using Graph API<\/title>\n<meta name=\"description\" content=\"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made &#039;auto post in Facebook page bot&#039;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to auto publish post in Facebook page - using Graph API\" \/>\n<meta property=\"og:description\" content=\"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made &#039;auto post in Facebook page bot&#039;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/datamatric\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-19T19:50:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-17T04:58:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Crafty\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataMatric\" \/>\n<meta name=\"twitter:site\" content=\"@DataMatric\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Crafty\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\"},\"author\":{\"name\":\"Crafty\",\"@id\":\"https:\/\/datamatric.com\/blog\/#\/schema\/person\/b989273cd3f41fca5a01064faf74a918\"},\"headline\":\"How to auto publish post in Facebook page &#8211; using Graph API\",\"datePublished\":\"2024-04-19T19:50:09+00:00\",\"dateModified\":\"2024-12-17T04:58:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\"},\"wordCount\":612,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/datamatric.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg\",\"keywords\":[\"API Key\",\"auto post in Facebook page\",\"data matric\",\"facebook api\",\"Facebook Developer Console\",\"Graph API\"],\"articleSection\":[\"Digital Marketing\",\"Facebook Marketing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\",\"url\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\",\"name\":\"How to auto publish post in Facebook page - using Graph API\",\"isPartOf\":{\"@id\":\"https:\/\/datamatric.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg\",\"datePublished\":\"2024-04-19T19:50:09+00:00\",\"dateModified\":\"2024-12-17T04:58:21+00:00\",\"description\":\"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made 'auto post in Facebook page bot'\",\"breadcrumb\":{\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage\",\"url\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg\",\"contentUrl\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg\",\"width\":800,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/datamatric.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to auto publish post in Facebook page &#8211; using Graph API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/datamatric.com\/blog\/#website\",\"url\":\"https:\/\/datamatric.com\/blog\/\",\"name\":\"Data Matric - Business Assistant\",\"description\":\"DataMatric Blog - Boost Sales &amp; Business Management\",\"publisher\":{\"@id\":\"https:\/\/datamatric.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/datamatric.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/datamatric.com\/blog\/#organization\",\"name\":\"Data Matric\",\"url\":\"https:\/\/datamatric.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datamatric.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/logo-trans.png\",\"contentUrl\":\"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/logo-trans.png\",\"width\":192,\"height\":192,\"caption\":\"Data Matric\"},\"image\":{\"@id\":\"https:\/\/datamatric.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/datamatric\",\"https:\/\/twitter.com\/DataMatric\",\"https:\/\/www.linkedin.com\/in\/data-matric-475029301\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/datamatric.com\/blog\/#\/schema\/person\/b989273cd3f41fca5a01064faf74a918\",\"name\":\"Crafty\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datamatric.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/05825468d43ac39a3d8eb41b39fcd846f260b72fd74a5bfc1e05abaf5dde2bf0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/05825468d43ac39a3d8eb41b39fcd846f260b72fd74a5bfc1e05abaf5dde2bf0?s=96&d=mm&r=g\",\"caption\":\"Crafty\"},\"sameAs\":[\"https:\/\/datamatric.com\/blog\"],\"url\":\"https:\/\/datamatric.com\/blog\/author\/cameladmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to auto publish post in Facebook page - using Graph API","description":"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made 'auto post in Facebook page bot'","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/","og_locale":"en_US","og_type":"article","og_title":"How to auto publish post in Facebook page - using Graph API","og_description":"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made 'auto post in Facebook page bot'","og_url":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/","article_publisher":"https:\/\/www.facebook.com\/datamatric","article_published_time":"2024-04-19T19:50:09+00:00","article_modified_time":"2024-12-17T04:58:21+00:00","og_image":[{"width":800,"height":500,"url":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg","type":"image\/jpeg"}],"author":"Crafty","twitter_card":"summary_large_image","twitter_creator":"@DataMatric","twitter_site":"@DataMatric","twitter_misc":{"Written by":"Crafty","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#article","isPartOf":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/"},"author":{"name":"Crafty","@id":"https:\/\/datamatric.com\/blog\/#\/schema\/person\/b989273cd3f41fca5a01064faf74a918"},"headline":"How to auto publish post in Facebook page &#8211; using Graph API","datePublished":"2024-04-19T19:50:09+00:00","dateModified":"2024-12-17T04:58:21+00:00","mainEntityOfPage":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/"},"wordCount":612,"commentCount":2,"publisher":{"@id":"https:\/\/datamatric.com\/blog\/#organization"},"image":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage"},"thumbnailUrl":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg","keywords":["API Key","auto post in Facebook page","data matric","facebook api","Facebook Developer Console","Graph API"],"articleSection":["Digital Marketing","Facebook Marketing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/","url":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/","name":"How to auto publish post in Facebook page - using Graph API","isPartOf":{"@id":"https:\/\/datamatric.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage"},"image":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage"},"thumbnailUrl":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg","datePublished":"2024-04-19T19:50:09+00:00","dateModified":"2024-12-17T04:58:21+00:00","description":"Auto posting bot for Facebook page. Publish unlimited posts for FREE. Also get ready-made 'auto post in Facebook page bot'","breadcrumb":{"@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#primaryimage","url":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg","contentUrl":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/facebook-graph-api-min.jpg","width":800,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/datamatric.com\/blog\/how-to-auto-post-in-facebook-page-using-graph-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datamatric.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to auto publish post in Facebook page &#8211; using Graph API"}]},{"@type":"WebSite","@id":"https:\/\/datamatric.com\/blog\/#website","url":"https:\/\/datamatric.com\/blog\/","name":"Data Matric - Business Assistant","description":"DataMatric Blog - Boost Sales &amp; Business Management","publisher":{"@id":"https:\/\/datamatric.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datamatric.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/datamatric.com\/blog\/#organization","name":"Data Matric","url":"https:\/\/datamatric.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datamatric.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/logo-trans.png","contentUrl":"https:\/\/datamatric.com\/blog\/wp-content\/uploads\/2024\/04\/logo-trans.png","width":192,"height":192,"caption":"Data Matric"},"image":{"@id":"https:\/\/datamatric.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/datamatric","https:\/\/twitter.com\/DataMatric","https:\/\/www.linkedin.com\/in\/data-matric-475029301\/"]},{"@type":"Person","@id":"https:\/\/datamatric.com\/blog\/#\/schema\/person\/b989273cd3f41fca5a01064faf74a918","name":"Crafty","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datamatric.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/05825468d43ac39a3d8eb41b39fcd846f260b72fd74a5bfc1e05abaf5dde2bf0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/05825468d43ac39a3d8eb41b39fcd846f260b72fd74a5bfc1e05abaf5dde2bf0?s=96&d=mm&r=g","caption":"Crafty"},"sameAs":["https:\/\/datamatric.com\/blog"],"url":"https:\/\/datamatric.com\/blog\/author\/cameladmin\/"}]}},"_links":{"self":[{"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":57,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions\/290"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/media\/102"}],"wp:attachment":[{"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datamatric.com\/blog\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}