How to check if page is restricted from advertising? - facebook

I am using Facebook marketing API for creating ads for client pages. But some ads are getting disapproved by FB ads manager because the client page was restricted from advertising. Is it possible to check if a page is restricted from creating ads or the page can't advertise.
I have found a field promotion_eligible for Page Object. It says, "Boosted posts eligibility status. Only visible to a page admin". Can we check if the page is restricted from advertising using this flag?
Thanks

Related

How do I get leads from multiple facebook pages using a facebook app and a webhook?

I'm trying to get leads from facebook pages using a facebook app and a webhook. I'm using Zapier right now(which is working) but I'm trying to create a custom solution to replace Zapier. My webhook is working for one page, but I have about 10 facebook pages and each page has their own, separate lead forms. I've used the Lead Ads Testing Tool to check to see if my facebook app is listed and their is only one page that lists my facebook app - the one that is working. I can't figure out how to add my facebook application to the other pages. What I've tried: I went into Business manager and made sure that my facebook user account is listed under each page and verified that I'm an admin on all those pages. I also tried to add or assign a CRM to the pages under Integrations->Lead Access in Business Manager but my facebook application named TestApp is not accessible via the search(see 2nd image), in fact, no CRMs are searchable except for Zapier. Questions: How can I subscribe each page to my facebook app so leads from all my pages will be sent to my webhook? Or do I need to create a facebook app and webhook for each page?

Facebook: How to post on own page using graph api without login

I own a blog like website, and as part of promotions I have a corresponding facebook page. My website contents are dynamic & when it gets updated(through a bot), I want the facebook page also to be updated by an automated post/publish from the bot which shows up the updates to the page viewers.
I could create a facebook page, and my bot programme which updates the web content is also able to publish the content on my facebook page using graph apis. But the posts are not publicly visible(Visible to only me/admin).
I could learn that it could be because my app through which my bot program is publishing to my facebook page is not public.
App->Status & Review, Status (Tab)
(Do you want to make this app and all its live features available to the general public?).
To make the app public, there is a review process which checks the facebook login button used in the website but my posts are through a backend bot and not through user action. My website is like a blog without user authentication so can't think of adding a login there.
Is it possible without having user login on the page? Also, If I post using twitter apis and link/configure my twitter account to my facebook page, it works.I guess this is not a new problem and many brands have automated it already, so need to understand how.
Am I missing something?
Apologies: I have checked previous posts on the same topic, but couldn't find relevant answers for the current Facebook version & policies.
Without the Login Review process, your posts can not be visible to the public.
To get it working, just send your page management tool (with the login dialog) for the review. Once they review it and accepted, you may change the flow a bit eg: skip the login part and allow auto posting.

Handling Unpublished page in Facebook add_to_page_dialog

I am adding my Facebook application to Facebook Fan pages through the Facebook Javascript add_to_page dialog. Every thing is working Fine, only the problem with unpublished Facebook pages.
I am retrieving the Facebook pages IDs of all the pages to which the app is added. If a person add it to such a FB page which is unpublished, I can't get the Page ID and app is still added to the Facebook page. I want to prevent the app to add to the unpublished page in case.
The Facebook developer documentation provides no help regarding this issue.
Thanks in advance for taking your time.
All the pages a user administers will appear in the dialog - there's no way to prevent an unpublished or otherwise restricted page from being selected - if you have manage_pages Permission from the user you can act as all of their pages, including the unpublished pages.
If you don't, and need to know which page your app is being loaded on, the signed_request sent to your app when the tab is loaded will include the page ID

Problem access graph api with some facebook page id/username

I have successfully made an facebook application which shows real time data from facebook graph api with no authentication. The method i have used is something the simple connection to the graph api because i only need the basic info for it.
$url = 'http://graph.facebook.com/'.$pagename;
// for id
$url = 'http://graph.facebook.com/'.$page_id;
$pageinfo = json_decode(file_get_contents($url));
This methord works fine but not for some pages in facebook. My client has send those pages url to me. From my pc but can't access those page (facebook redirects me to the homepage). Also i have tried to access the graph via those page username and id. Its just returning false.
Here are those pages. Note that not all pages but a few has this problem:
https://www.facebook.com/MontanaDaleCarnegie
https://www.facebook.com/pages/The-Painted-Swan-Online-Marketing/223492000998546
I can't find the issue why these pages aren't accessible. Is there any settings in the page settings page that make the page nonpublic or inaccessible via graph api? The client saying that he can access these pages.
I need your experience an input to overcome this situation. Thanks!
Apparently if any page has privacy setting restricted the page info can't be access in public.
There is couple of cases:
If the page is restricted to any country.
If the page has any age restriction. Selected anything other then Anyone (13+)
You might find it helpfull http://bugs.developers.facebook.net/show_bug.cgi?id=18162 Check comment #3.
I tried to take a look at your two examples and both take me back to the home screen. This certainly means that those pages are not publicly available.
Is there any settings in the page settings page that make the page
nonpublic or inaccessible via graph api?
Yes: In the page settings under "manage permissions" there is a checkbox for "page visibility":
Only admins can see this page
If this is checkbox is selected, neither a user on facebook nor the graph api have access to it. The only possibility would be (but I'm not sure) to use an offline access token from one of the admins.

Facebook application published on a Facebook fan page... not facebook profile?

I have a Facebook profile of my own, and asociated to this Facebook profile I have a Facebook fan page,,, and I developed a Facebook application that now days is published on Facebook.
What I want is to asociate this Facebook App not to my profile but to my fan page... I mean,,, I know that so I can create a Facebook App or a Facebook Fan Page I've to have a Facebook profile account but I would like to know if I can asociate the Facebook App only to be visible throught the Page...
Your only option is to make the application non-functional for other pages and users. You can do this by checking the POST variables (specifically fb_sig_page_id) to determine which Page you are on (or if you're on a Page at all). If the page ID doesn't match your page, just display a message.
Since applications automatically have Pages of their own created by Facebook, you can't prevent users from becoming fans/liking the application Page. This is one of the problems of the Facebook platform.
An alternative is to use the application Page as the official Facebook Page. This is what I've done with someecards (shameless plug). The application acts as the official presence on Facebook, so the official Page and the application are the same.