I'm working on an app and I need to pull in the public posts from the page of a business. I do not want users to login or send any information back to Facebook, I just need the posts so they can be shown in a read-only format.
I've looked around and from what I've read, Facebook offers ways to authenticate your connection to the API, but for security reasons you shouldn't make the calls directly from your app. I've seen something called a client token mentioned, that is assumed to be insecure, but I can't find much mention of it outside of https://developers.facebook.com/docs/facebook-login/access-tokens. It says it can be found in the app dashboard, but I have not been able to find it.
How do you make a call to get the posts of a public facebook page from an iOS app?
I ended up finding something that wasn't quite what I was looking for, but still got the job done: Facebook Page Plugin
It lets you embed the publicly available feed of a Facebook page into a web page. If you want to use it in an app you can host the web page that has the feed code in it and then load it into a web view in the app.
Related
It seems to me I am delving unnecessarily deep into GraphAPI and app creation to do this simple thing, but I can't figure out any other way.
What I want for my personal website(nothing connected to Facebook) is to insert a feed from a public Facebook page, much like the FB page plugin, but I need only about three latest posts and need to style them completely differently.
I tried to do it through FB Page Feed guide with GraphAPI and also PHP SDK, but both say:
This endpoint requires the 'pages_read_user_content' permission or the 'Page Public Content Access' feature.
...and to get Page Public Content Access, I need successful review of my app.
That doesn't seem to make much sense to me. I don't want to develop an app, I already have created a website and just want to insert public page feed in there. What am I missing?
I want to build a dashboard that enables any company to track the social media activity of its competitors.
For example.. let's say you are a small business owner. You would be able to add the 'facebook/instagram page id's' of your 4-5 competitors within the app. The app would retrieve the historical data of your competitors.. and enable you to interactively explore what they are doing. How often they are posting, at the time of the day, what is liked/not liked, etc.
Problem is: Since Cambridge Analytica, Facebook requires app review to allow access to public page data. But how do I show the app.. when I don't have the data to build it?
Does anyone have any remote idea whether the thing that I am trying to build is generally within that would be considered permissible by Facebook?
You can still make your dashboard which will show your Facebook activity.
To get the Facebook page ID of 4-5 competitors. The competitors have to use your app and allow permission to your app for accessing public features.
You have to own a Facebook page. Get OAuth key. For every request to Facebook you will be using this Key. In case of mischievous activity your OAuth key will be blocked.
What you are trying to do is not possible these days and neither permissible by Facebook.
You can build your App already and just use your own Pages for testing - with a Page Token of those Pages. Send Facebook a video how you are using the data in the review process. I have recently got Page Public Content Access approved for that specific use case. Facebook just wants to see how you will use the public content, the App does not need to be 100% finished.
What´s allowed and what´s not allowed: https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS
I have a pre-existing Facebook Business Page set up on Facebook and I just registered my website (App) on the Facebook Developers Console using the same Business name as the Facebook Page name. I am an admin on both the App account and the Business Page. My app is also on the list of “subscribed apps” for the Page. Even still, Facebook doesn’t see the app and page as the same business, and I still don’t see my page in the “App Pages” section of my App Settings like it says I should.
Ultimately, my goal is to be able to establish a communication between my web server and my Facebook Page in order to READ posts on my page using the Graph API. However, when I try accessing the page node or any of its edges using my App Token (via Graph Explorer OR my web server), it’s telling me I need an App review before I can read the public data on my own Facebook page.
My guess is that this is happening because there is still no established connection between the app and the page... and if that’s the case, what more can I do to make the connection? Anyone have any experience with this?
FYI: I’ve read many other posts on this issue and most of them are outdated or don’t give any clear answers to the question. I feel this question is valid due to the privacy changes introduced by Facebook last March.
You need to have your App reviewed, older apps work till August 2018. But as now every review takes a month and there is high change that you are not approved for "Page Public Content Access". Reason for approve denial is "it doesn't appear to enhance the user experience". And after that, there is not much you can do. You can make another app and submit it to the review, with info that might pass the review process.
As for now, i do not know the correct phrases to use in review-form, but if some-one gets "Page Public Content Access"-approval, please let us know how.
When I'm getting ready to move my app that I created (in order to use the Facebook API), the process asks for things such as App Name, icon, etc. I only created an app in order to use the APIs. I'm calling the app from my website and the app will not be public facing outside of my website. What should I put for these questions? Is this even the correct way to use the APIs to write to a company page? I created the Facebook app because that's the only way I knew to be able to use the Facebook APIs. If I don't need an app and can use APIs in some other way can someone please direct me to an example?
What I'm doing is allowing a user on our website to post their Testimonial comments to our Facebook company page's Visitor Posts. They are presented with the Facebook login dialog and then upon successful login the testimonial is written to the company page and the user is returned to our website.
I am looking for Like Button to be shown in my ios native app, users of that app have already connected to app via facebook account.
there are several questions related to Facebook Like Button on stackoverflow but those are not specific to authorized single facebook page of the app.
According to official doc of facebook, facebook pages can not be liked via built-in action o open graph api.
But want only one official facebook page of that app to be liked by user when he hits like button. i don't want user to navigate away from the app or login again in web view to like facebook page.
is it possible to like app's facebook page without promoting user to log in again in webveiw?
Edit
Findings
1. https://stackoverflow.com/a/5837036/1632984
2. Comment by wallacer
"the general consensus does seem to be that you can't like a page on behalf of the user, however I just had an ios game like a page on my behalf. Extreme Road Trip successfully manages to get you to like their own page. I wish I'd paid more attention when I did it now..." – wallacer
This still can't be done directly using the graph api ( to the best of my knowledge ). What you can do is open a webview to the page you want the user to like. If you're rewarding their liking your app or something, when they close the webview (you'll have to provide a close button), you can use the graph api to check whether they like your app page. As far as I can tell this is the best current solution - and seems to be the approach taken by mobile games.
That said, I haven't used Facebook SDK 3 yet, so there may be something in there that could help you.
It appears that Liking a page on behalf of a user is still impossible. I've glanced over the iOS SDK Reference, and it doesn't seem like there is a built in mechanism to like anything.
However, in reading one of the other posts you linked to, and remembering that Facebook opened up the Like open graph action so app developers could allow their users to like content generated by their application...I found this link about built-in-actions (likes).
According to that link, you can post Like actions to your users by POSTing to https://graph.facebook.com/<user_id>/og.likes with the POST params for object (the open graph object URL you want to like on behalf of the user in this case your page's url. eg. www.facebook.com/yourpage) and access_token (obviously, for your user).
I'm not totally convinced that will work; though it is conceivable. My second thought would be to create an Open Graph Object for your page, and have all your users like that. Though, that is a little less ideal, as it removes the possibility of people finding your Page while they're on Facebook and would require you to put a lot more effort into getting likes for the Page via your website, application, etc.
I hope that helps a bit, good luck.