Not able to get permission for Facebook API call - facebook

Our client wants to show the three latests posts from their Facebook wall on their website. Therefore we follow the procedure described here (the second answer) which seems pretty straight forward: How to embed a Facebook page's feed into my website
I can generate an access token easily but the call to the following URL fails and gives me the following error message:
https://graph.facebook.com/juwelierwagnervienna/posts?fields=full_picture,picture,link,message,created_time&limit=5&access_token=MY_ACCESS_TOKEN
This endpoint requires the 'manage_pages' or 'pages_read_engagement' permission or the 'Page Public Content Access' feature.
Therefore I requested manage_pages and in a separate request Page Public Content Access via the App interface. They declined both for the same reason over and over again although I made a pretty detailed description and a video to document my approach including code samples.
We determined that your app's use case for this permission is invalid, or it's not needed to support its core functionality. You can learn more about the allowed use cases by visiting our Permissions Reference or Features pages. Please resubmit your request, and ensure that you provide a valid use case with notes and screencast clearly explaining: [...]
I followed all of the instructions and resubmitted the request for approval several times already.
Would love to hear some feedback and recommendations on this one since I'm at a dead end here and the Facebook Support Chat can not help me either.

Related

How can I access Public Page posts without a business verification?

for years I was using Facebook API to fetch public Page post data using Page Public Content Access for my scientific school project, but because of new regulations, now it requires Business verification.
This confuses me, because the data is not used for any business purposes, this data is not sensitive(since it's available for general public) and yet I need to verify it for business use?
Maybe I am missing something and I don't need the permission for PPCA and should use something else?
The project used to visit a public public FB page and save some of the data from posts to my database.That's it.
Yes, Facebook has closed the "free-content-flow". You must keep in mind that even though the content that you are requesting from the GRAPH API is publicly available to anyone on the internet, BUT that does not mean that Facebook has to "open" their API for anyone to collect data from them so easily.
After I submitted my app for review (my review was fully loaded with a screencast and had all the criteria as required by Facebook) - this is what I got back from them. (See attachment)
FACEBOOK'S RESPONSE:
Not Approved: Page Public Content Access
App Verification feedback
We were unable to verify a valid use case for the requested permission(s) from the information you provided. Please ensure your use case is valid and that you are correctly utilizing the permission(s) in the app.
After review, your app does not require Page Public Content Access for its intended function demonstrated in the screencast. (But it does)
The only valid use case for Page Public Content Access is to read and analyze insights from other pages where you are not the admin.
Your app's intended functionality can be supported by the Manage_Pages or Read_Insights permissions. For more details on how best to incorporate these permissions, please visit our Permissions Reference.
Thank you.

Can I access a Facebook Page with the Graph API without creating an app?

In the past, I think a Facebook Page access token could be generated manually, and then used with the graph API to query posts, comments, likes, shares, etc. Now it seems you cannot query anything without developing an app that I login to and then in turn the app generates the access token. Is that true? For example, this question from 2015 claims no access token is needed for public data, but when I try their example it returns "An access token is required to request this resource."
I'm the admin of my page that ran a basic contest (giveaway). I'd like to use the graph API to fetch the names of people that liked, shared, or commented on a post. Then I want to cross reference it with those that like the page. Do I have to register and develop an app for this? Does my page have an access token available without going through the app registration and review process?
Can I access a Facebook Page with the Graph API without creating an app?
No, that is not possible. You always have to use an App for any API Access.
Then I want to cross reference it with those that like the page.
That is not possible either, not even with an App. I assume you want to make sure that participants like your Page - which is not allowed. People cannot be "incentivized" to like your Page.
Platform Policy: https://developers.facebook.com/policy/
Explanation about the specific rule against requiring people to like your Page: https://developers.facebook.com/docs/apps/examples-platform-policy-4.5

Read public posts from "own" Facebook page's timeline - Pages API requires review and business verification

For a recent PHP web project, I would like to import facebook posts from the customer's own facebook page to another web application. I planned to do this using a simple Graph query like:
GET /v3.0/{$pageId}/posts?fields=name,description,status_type,attachments{description,subattachments}
Unfortunately, due to the data leaks recently (March 2018) discussed in public media, Facebook has severely limited access to its Pages API. I get the response:
Facebook\Exceptions\FacebookAuthorizationException: (#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.
Facebook now requires a review of the web application and a business verification for the use of the Pages API, at least until August 2018.
Is there any other API that can be used for this simple usecase without those steps? I have access to Facebook accounts managing the one and only page I want to access.
If you have any idea about the effort needed for review and business verification, I'd be grateful too. Also, I cannot disclose the app's source code, but it looks like this is not necessary?
From what I understand of your requirements, you could call this endpoint in stead: https://developers.facebook.com/docs/graph-api/reference/v3.0/page/feed
This would not require the Page Public Content Access permission; but it may have to pass a review, if you plan to scale up the amount of users.
The review process consists in you describing your intents, uploading a screencast and, possibly (not necessarily), prove the existence of your business.
Edit:
If you don't plan on scaling the amount of users, try and putting your app in dev mode (the opposite of Live) - it's a switch in the upper right corner of the page. The app will be accessible to you as if it had been published - so no review process, no proof of existence of a company.

Find out whether Facebook page is live streaming

Is possible to find out whether some facebook page is live streaming right now? I was looking at Facebook API and from there it seems to me that it is not possible since /{page_id}/live_videos seems to be working only if you are an admin of the page (or you have been granted the access) since you cannot read live videos of public without page access token.
Yes, you can. This is actually called a WebHook (simultaneous notification of a certain app/user about changes made on the page). To do this you will have to create a Facebook App that will be subscribed to the changes made on a certain page that you want to track.
You can simply do this from the dashboard of the app or through Graph API 2.7(since this version supports live_videos) calling {app-id}/subscriptions and choose any of Page Object Subscriptions, which are available through Facebook API(in your case live_videos).
For this kind of subscriptions your app needs to be whitelisted in order not to spam or re-transmit the information received from a certain page.
To get more information about WebHook implementation please read Facebook API documenation: https://developers.facebook.com/docs/graph-api/webhooks
I know this is quite late already but for those that may stumble on it like I did, Yes it's possible.
As clearly stated in the documentation
Page Live Videos - Facebook API Documentation
You will need to make a GET Request to the endpoint below with the appropriate parameters:
https://graph.facebook.com/v6.0/{page-id}/live_videos
Where page_id is the Facebook Page ID you with to check for active Live Stream
The endpoint also expect broadcast_status whose value for your use case would be LIVE
Note: You will need and app setup on Facebook for developers platform and your query would have to be via the app
Further details can be found in the documentation whose link I provided at the initial part of this answer.
You might be able to get a returned string if there is any, from:
GET /v2.7/{page-id}/live_videos HTTP/1.1
Host: graph.facebook.com
You can read more in: https://developers.facebook.com/docs/graph-api/reference/page/live_videos/

How can I detect if a certain post on a Facebook page has been deleted?

I am planning to build a small side project that stores posts from particular public pages. And detect if they delete the post later. Something similar has been done for Twitter. But I couldn't find similar projects for Facebook.
Like this: http://politwoops.sunlightfoundation.com/
But for Twitter. I will do it in Python or C#
How can I go about it?
Any particular code or projects I can learn from?
The only way to check if a post is not there anymore on Facebook is to search for it with a User Access Token of the User who posted it. Every Object on Facebook gets a specific ID, you only have to check if that ID still exists. If not, you get an Error from the API.
For example: https://developers.facebook.com/tools/explorer/?method=GET&path=10203433018378479&version=v2.0
The path parameter is the ID of the Post.
Keep in mind that you need the read_stream permission for that, and you need to let Facebook approve it for other users or it will only work for Admins/Devs of your App. It is not very likely that you will get the permission approved for this though. It usually only gets approved for Apps on "Platforms without a native Facebook experience".
Edit: My bad, i was thinking about User posts, but your question was about Pages. In that case, all you need is an App Access Token (App-ID|App-Secret). The API Call would be the same, you just need to know the Post ID.
About Access Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens/
http://www.devils-heaven.com/facebook-access-tokens/
For getting the feed of a Facebook Page, see the Facebook docs (including code samples): https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed/
You can use graph api for this. If it's a public page, you can follow these steps:
Create your application in Facebook developers site
Setup the basic graph auth mechanism with your favorite language and get unexpired token.
Use your unexpired access token to do these tasks:
Enter the id of the pages you want to crawl http://graph.facebook.com/[insert page id or url here]/feed
Add post title, postID to your database.
Create a scheduled task on your server to do these tasks:
Select all / page based etc posts on your database and send a request to: http://graph.facebook.com/[insert post ID here]
if it returns it means it's still there. otherwise it will return an error.