PHP get link to Facebook post -


i successfully post facebook group using:

$post_url = '/' . $my_group_id . '/feed'; $msg_body = array('link' => urldecode($link), 'message' => 'new post:'); try {   $postresult = $facebook->api($post_url, 'post', $msg_body);   if (!$postresult) // handle error... } catch (facebookapiexception $e) {   // handle error... } 

question is: how can permanent link new post in facebook, can point website?

i can manually checking properties of new post in facebook, how can within php code, after successful posting above?

if have response in $postresult:

{   "id": "xxxx_xxxx" } 

the permalink "https://facebook.com/{id}", it's:

https://facebook.com/xxxx_xxxx 

facebook handle forwarding real final url in group.

i tested using graph api explorer , seems work consistently.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -