publicating using php facebook api creates only permalink insted of post on facewall -
i'm using php facebook api 3.2.3 connect facebook , publicate messages page.
until working find, messages not publicated. when copy returned fb message id create link, there, not on facewall.
i can accesss message link this:
https://www.facebook.com/permalink.php?story_fbid=800134770033938&id=659754124150164
it says, i've publicated link on fanpage, not visible on wall. ofcourse there necessary permissions.
code looks this:
$fb_fanpage_name = $fb['fbfanpagename']; $fb_access_token = $fb['fbaccesstoken']; $fb_app_id = $fb['fbapp']; $fb_secret = $fb['fbsecret']; $facebook = new facebook(array( 'appid' => $fb_app_id, 'secret' => $fb_secret, 'cookie' => true, )); $post = array( 'access_token' => $fb_access_token, 'link' => $fb_url ); try { $res = $facebook->api('/' . $fb_fanpage_name . '/links', 'post', $post); } catch (exception $e) { $this->zp($e->getmessage()); }
according fb api on page https://developers.facebook.com/docs/graph-api/reference/v2.3/page/links/ - can't posting links this.
apparently want post message feed. try :
$post = array( 'access_token' => $fb_access_token, 'link' => $fb_url, 'message' => 'try me!' ); $facebook->api('/'. $fb_fanpage_name .'/feed', 'post', $post);
update : find @ page https://developers.facebook.com/docs/graph-api/reference/v2.3/page/feed
Comments
Post a Comment