-1

I try to post on user wall but i don't know how to put a specific link from my page in the link parameter.

If i write something like this it doesn't works:

$link='/path/foto.php?id='.$id;

$facebook->api('/me/feed', 'POST', 
    array('link' => $link, 
     'message' => 'Lorem ipsum')
);

and if i write something like this the link goes to a page outside facebook

$link='http://www.site.com/path/foto.php?id='.$id;
Anonim Wd
  • 65
  • 2
  • 9

1 Answers1

1

First sample doesn't work because URL of the link should be canonical not relative.

If you want to publish link that points to specific page on Facebook.com use full URL of that page. Be warned that content displayed aside of link is taken from OpenGraph meta tags so page must be publicaly accessivle, and not all pages on facebook.com define those tags (actually minority).

Juicy Scripter
  • 25,778
  • 6
  • 72
  • 93
  • where it says that 'message' is deprecated? And what can i use instead? – Anonim Wd Jan 16 '12 at 14:05
  • @AnonimWd, by bad, confused it with [Feed Dialog](http://developers.facebook.com/docs/reference/dialogs/feed/) `message` parameter. Yet `message` should be something from user itself, for any data that came from application OpenGraph tags should be used on page `link` pointing to... – Juicy Scripter Jan 16 '12 at 14:18