Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mention Facebook Page in Page API Post

Apologies this is a duplicate post of - Facebook Graph Api - Posting to Fan Page as an Admin

The graph API states verbatim that (https://developers.facebook.com/docs/graph-api/reference/v2.1/page/feed/):

The main body of the post, otherwise called the status message. Either link or message must be supplied. The message can contain mentions of Facebook Pages using the following syntax:

 @[page-id]

For example the following message would mention the Facebook Developers page inline:

 Test message @[19292868552] tag

If I post to a page (for which I am an admin) with the above syntax, using a page Id for the inline link (for which I am also an admin) and using a facebook application (for which I am a developer) this doesn't appear to work. An example of my call is:

https://graph.facebook.com/v2.1/page-id1/feed?message=Test+message+@[page-id2]+tag

In my case the tag is rendered as it appears above, i.e. no link or mention. So far I have tried:

  1. Different combinations of page-id1 and page-id2.
  2. HTML encoding the @, [ and ] symbols.
  3. Posting as a page or as a user.
  4. Using a different notation @[page-id:page-name]. This is not rendered atall, just becomes a blank space.

I must be missing something obvious if anyone is able to shed any light on this!

like image 389
MarcF Avatar asked Sep 23 '14 15:09

MarcF


1 Answers

That's the documentation for API version 2.1, but your sample call there is unversioned and would thus be using the oldest supported version which is v1.0.

The v1.0 documentation doesn't say anything about that functionality, so it's likely only available in v2.1 or higher

The docs also say your usage of that feature needs to be approved before it can be used by the public, but i think using the correct version should get it working for you for test purposes, provided you're an admin of the App, the Page you're tagging and the Page you're updating

like image 128
Igy Avatar answered Oct 06 '22 12:10

Igy