Our client is wanting to have their application actually create new pages on behalf of a user. I've found a couple of workarounds for posting items to pages that already exist, but nothing for creating new pages (although the documentation on Facebook pages is pretty sparse). Any suggestions?
your APP need Standard Access permission from Facebook. Once you have this permission you can performance this action using /{user_id}/accounts, to create a new page under this user. This is my way to create new pages, and It works.
Yes, but you will need to first get Standard access to the Facebook Marketing API.
Related
I'm trying to create an ad for someone else's page using the Marketing API.
So far I have
My own access token which works fine for creating and managing ads for my own page
Another user's access token with pages_manage_ads and ads_management permissions given for one of their pages
The rest is very confusing. pages_manage_ads is supposedly for creating and managing ads for a page, but the documentation only mentions reading page ads, not creating or editing.
Has anyone gotten this to work?
I've done it before, but some time ago and it often changes in detail. What I would do is going to API Explorer and try to get to the first success by first reading the ads related to the Page and then creating them by leveraging existing posts there. You can create them in a paused state.
https://developers.facebook.com/docs/marketing-api/reference/adgroup
Facebook is all about experimenting, so if you don't want to experiment with your user's page you can create your own dummy page and try it there first.
My name is Alaa and i am the IT manager of my company,
We used our facebook app and the facebook PHP SDK to share our articles automatically from the backEnd of our website to our facebook pages.
so we use the facebook graph API to retrieve the Access Token of our pages and use it in the php script.
But from February 13th, the script is not working anymore. I don't know what to do exactly, but looking on the internet, I found that we must use a new API (Marketing API) because we migrate our facebook account from default to business and we must have permissions (publish_pages, manage_pages), i want to inform you that we used the app several years without need to these permissions.
I want to add also that I can't show my business pages anymore in the list of all pages i manage (Personal and Business).
for example when i use facebook graph API to get access token of a page, i can just see my personal pages and not business pages of my company. i hope that you can anyone explain to me why?
I explain all of that on a video please click here to see it : https://www.youtube.com/watch?v=zhDerUakiNk
Thank you very much for your help.
Have you tried restarting your server? That's what fixed it for me.
Please could you help. I have created a website that allows people to upload listings of items they are selling. I want to know how to add the feature where when someone creates a listing, it automatically posts on the user's FB page, with a link to the listing on our website. Is this possible? Would the user have to log into our website using their FB account for this to happen? Thanks everyone for your help.
Martin
You need to create a Facebook App and use Facebook Graph API with publish_actions permissions to do that. Note that the facebook rules prohibit sending fully automated messages that the user has no control, your user must have the ability to edit the message before sending
I want to create a facebook business page programatically via their API.
I looked at each of the technologies listed on developer.facebook.com but there is nothing that i can use to create a new page.
After alot of googling i found out that it seems to be impossible to create a page programatically. And i almost gave up, but then i found
https://www.pagemodo.com
Testing their service i see that they can actually create a new one and looking trought their javascript files it seesm they do it on the backend.
After reading some more i found about the new facebook business API ( https://developers.facebook.com/docs/reference/ads-api/businessmanager ), and i got nowhere with that either.
I am on the verge of believing that it's impossible, but having the working example on pagemodo makes me unable to give up :D .
[Possible Solution 1]
Another ideea that i have on how to achieve this is to
manually create a number of template pages on my account (not published).
add that user as an admin to one of the pages via API [*]
remove myself from the administration via API [*]
edit the page title/description/etc. via API
publish the page via API
For the normal users, it will look like the page was created auto,so this could work. But the problem is that i couldn't find anything in the API to make the [*] operations work.
Any help appreciated
It's possible. You need to get your Facebook App whitelisted to get access to page creation apis.
It is not possible to create business pages via the public Facebook API.
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.