Mention Facebook Page in Page API Post - facebook

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:
Different combinations of page-id1 and page-id2.
HTML encoding the #, [ and ] symbols.
Posting as a page or as a user.
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!

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

I was stuck on this for quite a while too. A clear answer was given by Igy on the Facebook bug tracker page...
To clarify, for testing this functionality before submitting it for approval you must be posting as a page you admin, tagging a page you admin, and using an app you admin - otherwise the tags are not applied
This is a great answer, but I misunderstood it at first. I was trying to #[page-id] a Facebook page with my test users page. I thought since I was logged into Facebook/developers as an admin with my personal facebook account that the test users I created counted as admin users too and I would be able to #[page-id] other pages they were admins of from their page.
It seems that you can only perform this functionality with the admin account you're signed into on facebook/developers. That account must have a Facebook page they admin, you must use the page access_token and #[page-id] a facebook page they admin from your users page in order for it to work. Once I got over the fact that I can not test this in my development environment with my test users It worked perfectly!
Hope this helps anyone else that might be haveing the same problem.

Related

Facebook Mentions on a Facebook Page with Graph API

Has anyone had success with a mention of a FB Page via the Graph API? I'm trying to have one page mention another posting via the Graph API.
I have permissions: "pages_read_engagement" and "pages_manage_posts".
Have tested using FB Pages I'm the admin of with an approved app I'm admin of. Also these Pages are over 6 months old. Also using a real user (mine) and not a test user.
Have posted with #[Page Id], #[Page Name], #[Page ID:Page Name], and #[Page Id:1:Page Name]
Made sure in the Page setting mentions by others is allowed.
Using Facebook SDK version 11.0
and the post always has the mentioned removed.
For example "This is great #[109904187850644]"
posts as "This is great"
The only time mentions show is when the Page mentions itself.
For reference:
https://developers.facebook.com/docs/features-reference/page-mentioning
Related question but using version 2.1 from 7 years ago: Mention Facebook Page in Page API Post
Any thought on the issue? Permissions, way posting, etc?
I have done this recently so I hope I can help you out.
To me it sounds like while you have the required permissions you are missing the actual Page Mentioning Feature. As described on the Page Mentioning Reference the Feature is required to #mention other Pages this is why mentioning the posting Page itself works.
To get authorization to use said feature you have to do an App Review.
Additionally you might want to read up on the differences between Permissions and Features.
From my experience there is no way to test out any functionalities requiring a Feature without doing an App Review because the Graph API will not return any useful data even in development mode while you can test out any permissions without having to do an App Review before.

Tag persons in Facebook page post

I've written a Facebook web application, which is able to post links to the app page feed (as the page) by requesting the page token and doing a post request to the /PAGE_ID Graph REST endpoint. So far, so good, but I'd like to tag the links with their authors as well. When I add the tags parameter to this request with a value of my user id (I am an admin of the page), this works fine. But when I enter another user id (even one that likes the app page), no tagging is done. Does anyone have any experience with this? Some blog post suggest this is not possible using the Graph API, even though this is possible when done manually.
Thanks!
If I understand correctly what you want to do, it is no longer possible with the new version of the Facebook's API (v.2.0).
Refer to this page for more informations.

Automated Posts Made to Facebook Page Via API Can't be Seen by Users

I recently set up an HTTP poster that uses cURL, PHP and the Facebook API to post to my page's timeline.
The page is a dedicated #nowplaying page for an online radio station, so the auth token and associated facebook app is only for one user, which is myself.
The poster has been working for a few weeks, but I have only just now realised that only I can see the posts, which (as they appear to me) are made 'as the page'. Other page followers can only see a single manual post I made welcoming people to the page.
I know this might be a super user question, but I have checked all relevant page settings, and the fact that they can see manual posts by the page makes me thing it's an API/Token thing.
Q: Why can't my facebook page visitors see my automated posts?
Here is my page
Here is what I see, and what I want users to
see. Note: notice the little world logo on each post indicating that they are public.
Edit: I'm making the post over http at https://graph.facebook.com/{pageID}/feed...

I am wondering if it is possible to have the facebook reviews on my website as a module

On my facebook page I have reviews, I am wondering if its possible to have this review box on my page, on my website, similar to the activity feed plugin.
I know there is not a plugin for this, but I think it would be good for my customers to make a review of my pub on my website and for it to post to facebook reviews
Bad news, page ratings can't be posted through facebook API, you can only do GET requests. So the only thing you could create on your website is a livefeed of your page ratings, if a user wants to rate your page you will have to redirect him to your facebook page.
I don't know the existence of any plugin that does that for you. But you could create your own, you just need to create a Facebook APP, you could do that easily going to https://developers.facebook.com/ and register yourself as a developer.
Since I don't know what's the language you intend to use, I'm going to post a PHP example, even if that's not the language that you are using, the logic is the same, you just need to use the SDK, in this case I'm using the official PHP SDK, for this script to work you must be admin of the page you want to query the ratings.
Also notice that I'm not posting the entire code here, I'm assuming that you have some experience, if that's not the case, don't panic, it's pretty simple to learn the basics of Facebook APPS.
You will also need to ask for the manage_pages scope, more info on other scopes here:
//get user accounts
$pages = $this->facebook->api('/me/accounts');//this gets the pages where you are the admin
foreach ($pages['data'] as $page) {
if($page['id']==PAGE_ID_YOU_WANT){
//the user is admin of the page you want
$page_access_token = $page['access_token'];
$page_ratings = $facebook->api('/PAGE_ID_YOU_WANT/ratings', 'GET', array('access_token' => $page_access_token));
var_dump($page_ratings);
}
}
I assume you are referring to page ratings/reviews for Local Business pages. Each rating information are accessible via /{page_id}/ratings as documented here.
You just need to obtain your page's access token and access the endpoint above.
Since you already have reviews on pages, your page is appropriately categorized as one, but for those who have similar problems I post how to modify page settings to have ratings and reviews.
EDIT: Sorry, you were looking for some plugin module just like activity feed. As you can see on the Social Plugins document, they don't provide ratings/reviews plugin. And if you try to implement this yourself, you need to access the endpoint as I introduced.

New app not available in list for "insights for your website"

I created a new app last week with the purpose of using Facebook insights for our website, but it is not available in the list to make the connection with. Do I need to do anything to make the app selectable?
For any of you people who think this question is not technical and shouldn't be here, I was directed here from Facebook bugs because it's not a bug.
I have had the same issue but after a bit of experimenting I found that it does not affect the ability for you to claim a domain and associate it with an app.
What the drop down list does is generate the code snippet shown below. I'm guessing this was useful when you was able to link it to a page_id (you can no longer do this). As long as you have put the correct meta tag (such as that below, replacing %%app_id%% with the app_id given by the Facebook App Center) you are free to ignore what account is shown in the drop down.
<meta property='fb:app_id' content='%%app_id%%'/>
Once you have linked the account you can go back to the Facebook App Center and set permission on the account.
Tip: While you can only give other verified developers Manager access to the app you can add any friend or email address to the insights level of access which is all which they need.
Not sure if this is the case here. But I do know that there is a threshold to see insights with regard to pages.
As detailed here in the FAQ's -
Is there a minimum number of users to see Insights for Pages? Yes. For
user privacy reasons, Insights are only provided to Pages with greater
than 30 users who like that Page.
Perhaps there is a limit for domain insights too. You should allow some time and some traffic pass before the insights start being able to give feedback...
I had the same error, I tried to debug my site here FB Debugger
which is the official debugger you can input URL, Access Token, or Open Graph Action ID.
It works for me.