Embedded Facebook group feed not showing personal data - facebook

I am trying to fetch a simple feed from a Facebook group, to render on a web page.
From what I understand, I need to use the Group API, and this requires an app that is submitted for review.
What I'm struggling with is that the review process requires me to submit a screen cast of the feed working, but I need the review to get the feed working.
With a user access token (as opposed to an app token which I suppose I will be using after review approval) I can get results from the API, but I am still unable to load any user data (ie the from field is not populated). I don't see how I can meet the prerequisites to the app review without first being approved.
Am I missing a permission or looking at the wrong fields, or something else entirely?

Related

Getting Facebook App Approval for Registration, Signing In and Sharing

1) Do we need to get Facebook app approval to implement registration and signing in via Facebook in the project? The website needs to fetch user data to fill in the registration form, and to sign in in the same way.
2) As another disirable feature on the website, we need to make and trace wall posts (i.e. make a wall post on the user's Facebook page, and get the post id). For this we definitely need app approval, right?
3) So here we get the main question: we need app approval, but what should we do to get it? Meaning, is it mandatory to record a screencast, and how can we record it without a working Facebook button?
4) Neither have I found any facebook developer support contacts to address, just a reference to this site. Any clues?
5) And the last question: how long does the review last? Is it even reasonable to make such a request if the project lifetime is just about a month or two?

Is there anyway to pull events from the Facebook Graph?

I have a travel app that, used to, pull events from Facebook using the GET /search?q=tokyo&type=event enpoint. I understand this endpoint is now deprecated per this.
So I started to use this endpoint from my Facebook PHP SDK: GET /me/events where in order to pull an event from the API, I'd have to manually set my self as going on my personal Facebook account. Just yesterday I noticed that it now returns 200 response with an empty JSON.
I also saw this post that suggested that access to user_events will face more scrutiny in the App Review process. However, I already went through an app review last year and I can see this in my dashboard:
Hovering over the green circle says: Live and Available to all Users.
So what's wrong?
Also, I can see this note in the App Review process docs:
You do not need to submit your app if it will only be used by you or
by a reduced number of people. Any account listed in the Roles tab in
your App Dashboard, such as admins, developers and testers, can access
all permissions and generate a user or page access token.
You can use any of these accounts to test your app and create a
screencast.
And that's exactly what I do, I pull the events that belong to my account, that is registered as a Developer on the app's dashboard. However, trying to pull my own events even from the Graph Explorer returns empty JSON.
My last resort seems to be to resubmit an App Review. However, given that I already went through late last year, I receive this warning when clicking Start Over:
Is it safe to do or will current permissions be revoked in any way? If so how long will this process take?
AND MOST IMPORTANTLY
How do I pull events right now in the wake of these updates, and is my issue really related to Cambridge Analytica incident or am I missing something? And do I really have to resubmit for an app review?

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.

As a developer, can I browse posts published through my app?

I found the section below on Facebook Developer. Does Facebook provide a way for me to browse the posts by my users, or do I need to store the post ID and write my own dashboard?
It depends which SDK you are using. In general, Facebook does not offer a solution on their own, and if you are using the JavaScript SDK for the postings there is no way to get to the message.
That being said, the only way to get the messages posted via the JS SDK is the following:
The user has to authorize your app
You have to store the access token of the user
You have to store the Post-ID of every post so you can make an API call to get the message
Remember that those user access tokens are valid for ~2 hours only, so you have to use an extended one (up to 60 days valid). After those 60 days there is no way to read the messages anymore, so you would have to store them in your database if you need/want them later. Also keep in mind that the user can remove your app and invalidate the token.
If you are using the PHP SDK for posting (which only works for users who authorized your app), then you can just store the message value in your database because you need to get the message anyway (from a textfield, for example). But be sure to tell the user what you will store, also why and for how long, for privacy reasons.
Summary: The only way to do this (without getting problems with access tokens) is to let the user authorize your app, after every publish you have to use the new post id to get the message with an API call and to store it in your database. This is valid for the PHP SDK and the JS SDK.
Yep, there's no way rightnow, by which you can view the posts published through you're app. The only way you can achieve this is by storing the post_id for every published post, and create a script that will fetch the posts data, when provided with the post_id's

Facebook graph API returns empty data for a page

I have an application that is retrieving data from Facebook. Users authorize the application to read and write to their pages, and we read their data and post to it from our application. All interaction occurs via the PHP interface that Facebook supplies.
For the last few months our application has been performing this task flawlessly. However in recent days we have started noticing an issue with certain pages.
We go out and retrieve data for a specific page, and we no longer get any data. Instead Facebook returns us an empty result. This obviously causes problems in our application which needs to read this data.
We can still write data just fine.
I am at a point where I'm not sure what this could be. Any common scenarios or recent Graph API issues that could cause this?
This sounds odd. The only thing that comes to mind is that the page owner has put a restriction on the audience for their page, which would then require you to pass in an access token to access data about the page. An example would be a beer company that wants to limit access to their FB page to users that are older than 21. Since there is a restriction on who can access the page content, we enforce that restriction on the FB platform. In this case you would need to pass in the access_token of a user who is 21 or older to access the page details via the graph api.
Adding to Jeff's answer, I found that any kind of restriction whatsoever will return a blank data object. I was banging my head on every single setting on my company's page and found that we had it set to only show in certain countries (Manage Settings > Country Restrictions). Removing all of them from the list started to return all the data we needed.