{"id":6106,"date":"2014-04-13T02:24:01","date_gmt":"2014-04-13T02:24:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/how-to-share-a-link-to-facebook-fan-page-as-admin-of-fanpage-with-facebook-api-collection-of-common-programming-errors\/"},"modified":"2014-04-13T02:24:01","modified_gmt":"2014-04-13T02:24:01","slug":"how-to-share-a-link-to-facebook-fan-page-as-admin-of-fanpage-with-facebook-api-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/how-to-share-a-link-to-facebook-fan-page-as-admin-of-fanpage-with-facebook-api-collection-of-common-programming-errors\/","title":{"rendered":"How to share a link to facebook fan page as admin of fanpage with facebook API-Collection of common programming errors"},"content":{"rendered":"<p>I have a issue with the facebook API. I created a fan page and set admin of page which is my account facebook. After that, I want to use Facebook API to post a feed to fan page. In this case, I have tested with 2 types : status message and share link.<\/p>\n<p>1&gt;Post a message to fanpage :<\/p>\n<pre>\n\n    $publishStream = $fb-&gt;api(\"\/\" . $fbPageId .\"\/feed\", 'post', \n    array(\n        'message' =&gt; 'test ' . time() . ' http:\/\/example.com',\n        )\n    );\n\n<\/pre>\n<p>Result : I&#8217;ve posted to fanpage success and owner of feed was <strong>fanpage<\/strong>.<\/p>\n<p>2&gt; Share a link to fanpage<\/p>\n<pre>\n\n    $publishStream = $fb-&gt;api(\"\/\" . $fbPageId .\"\/feed\", 'post', \n    array(\n        'link' =&gt; 'http:\/\/example.com',\n        )\n    );\n\n<\/pre>\n<p>Result : I&#8217;ve posted link to fanpage success and owner of feed was <strong>user<\/strong>. This feed will show in <strong>Recent Posts by Others on ABC Page<\/strong> (ABC is name of fanpage). Anyone have got same issue like me ? Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a issue with the facebook API. I created a fan page and set admin of page which is my account facebook. After that, I want to use Facebook API to post a feed to fan page. In this case, I have tested with 2 types : status message and share link. 1&gt;Post a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6106","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6106"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6106\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}