I am currently trying to get the posts for a specific user from Facebook's Graph API. I have done this numerous times before using a php script I have developed; but the problem this time seems to be on Facebook's end, not mine.
I am trying to get the posts from (replacing TOKEN with an access token):
https://graph.facebook.com/100001558773450/feed?access_token=TOKEN
The graph won't show any posts by the owner of that page but will show everyone else's posts, and as far as I can see the posts are marked as public, and there are no privacy settings set on the account that would stop it from adding the posts to the graph.
Any ideas?
Thanks,
Nick
Check that you have requested the manage_pages permission to give you full access to the page (if you need access as the "page owner").
Using the access_token you've got, according to this documentation there are three different things that you can select feed, statuses and posts.
I'd give those three a go from https://graph.facebook.com and if what you get back is what you require.
https://graph.facebook.com/100001558773450/feed?access_token=...
https://graph.facebook.com/100001558773450/statuses?access_token=...
https://graph.facebook.com/100001558773450/posts?access_token=...
You need to check the "profile" privacy settings (what to share with apps). But most importantly, this is against Facebook ToS!
You can't use a user profile to represent your business, you need to use Facebook pages instead!
More can found here:
Why should I convert my profile (timeline) to a Page?
Since profiles
(timelines) are for meant individual people, they aren't suited to
meet your business needs. Pages offer more robust features for
organizations, businesses, brands, and public figures, which you can
learn more about here.
Further, maintaining a profile (timeline) for anything other than an
individual person is a violation of Facebook's Statement of Rights and
Responsibilities. If you don’t convert your profile (timeline) to a
Page, you risk permanently losing access to the profile (timeline) and
all of your content.
Related
(I'm aware of this question, but it's outdated to the point of no longer working, so asking again.)
With the Facebook API it used to be that all profile pictures were considered public, and you could get one for anyone without any access tokens like this:
https://graph.facebook.com/4/picture
Now in 2020 it seems that it only works for public images like Zuck there. I have a tool for Facebook page admins that shows a list of people who liked page posts, but when I try to show user pictures in the list they all now come up blank because "This object does not exist or does not support this action".
The docs now say "This document refers to a feature that was removed after Graph API v3.2". But I could not find any more information about this deprecation. Is it now just impossible to show the picture of a user without having a user access token, or has the way to call it just changed?
The feature has not been removed, but now for users that don't have their profiles set as public, you need to provide an access token.
For instance suppose you use the Page API to list all the people who commented on a post. Previously you could show the profile pics of commenters by just linking to https://graph.facebook.com/<UID>/picture. However now you need an access token for that Page, and to then access the pic as https://graph.facebook.com/<UID>/picture?access_token=<TOKEN HERE>.
I have not tested this with apps, but I would assume that also to get the profile pics of app users based on their app-scoped UID, you'd need to include an access token there as well.
I want to scrape comments, likes and posts for a Facebook page that I'm an Analyst in (I'm not the admin, I've been given the 'Analyst' role).
I'm using the code in https://github.com/minimaxir/facebook-page-post-scraper to scrape comments.
Apparantely, you can get likes, posts and reactions but you cannot retrieve the comments of a Facebook page without a Page Access Token.
so I went ahead and looked at the popular answer in the link facebook: permanent Page Access Token?
Not sure if this used to be the case before, but if you follow the instructions in Step 1, substep 4, In the pop-up, under the "Extended Permissions" tab, check "manage_pages". For this to work, it is asking me to submit a request with many checkboxes asking me the purpose of needing this permission, and along with this, it is not letting me send a request review without having Privacy Policy URLs, App icons, User Guidelines and a VIDEO showing how this App will be used.. I literally just want to scrape comments from my own Facebook page where I'm been given an Analyst role that has lesser privileges than Administrator, and for this I was asked to create an App for it and set Native or desktop app? to No to ensure I don't get a Bad Request when I run my code.
I'd love it if you could give me any help in this direction.. I want a solution to how I could get Extended Permissions or follow the steps in the popular answer, or simply get Page Access Token without having to set Privacy Policy Guidelines, an App icon and a video showing a demonstration of something I can't understand.
I'm trying to create a small recommendation system based on what pages people like in Facebook. This is how it will work:
someone will login with Facebook
accept the terms to retrieve information
then the program should get all pages this user liked
Concern
Since I have all the liked pages from a user, which page should be the most relevant for recommendation?
I was trying the Graph API Explorer from Facebook to get all my likes or even comments made to posts of a page that I liked, so with that I could count and prioritise the pages in my program.
However I thought this should be a security issue and after testing I confirmed that was not working (user access tokens permissions were selected correctly for this test).
Questions
Is there a way to make this work?
Should I use another solution?
I was wondering if it's possible to get some kind of insights,using facebook graph, for the personal profile.
Basically I want to know some demographic information(age,gender,location) about the user who shared, liked my feed posts.
I found on the internet that wolfram alpha can do this, although I tried using my profile and besides some information about me, it didn't show any demographic data.
https://www.wolframalpha.com/input/?i=facebook+report
So do you know how get I get some demographic data about the persons who liked/shared my posts.
Thanks,
Not possible at all. Without authorization, you can´t get any detail of the user - for obvious privacy reasons. Insights are for Pages only.
How can i show the wall (feed) of my page to app on facebook? As i see in the page
www.facebook.com/kesha?sk=app_178091127385 and
www.facebook.com/pages/Khanduna-Yengu-Nangsu-Amuktang/187317137978077
I want show the wall(feed) of my page to my app of facebook. Please Help me.
I also try and see graph api as below
graph.facebook.com//feed
But Fail,
Please Help any one.
As I understand your question, you want to take the wall of your page and show the content of that on another page controlled by an app you have made, so that is the question I will answer.
There are a couple of things you need to do.
Facebook now requires you to have an access_token to get that information. You can get this in two different ways. Either you get your users permission to grab an access_token for them, or you create an access_token for one of the admin users with offline_access and manage_pages permissions.
There are problems with both cases:
1: Getting an access_token per user requires people to give permissions to your app which is quite annoying if they just gain access to the contents of the feed.
2: Having one access_token is also a problem seeing as Facebook puts a limit on how many requests you can make per access_token in a given time.
You need to balance these things out if you want the feed to be shown. Which case would you most likely use? If you don't have many users the second case might be the best, but if you go over the request limit no content will be shown and that could confuse your users.
Anyways.. Once you are past the access_token problem, you can access the information by getting the content from the page:
https://graph.facebook.com/YOUR_PAGE_ID/feed?access_token=YOUR_ACCESS_TOKEN.
You then get a nice json output you can use. If you are using the Javascript API you can simply use the information here:
http://developers.facebook.com/docs/reference/javascript/FB.api/
If you are ever unsure how to get the information you need there is a nice tool for that developed by Facebook called Graph API Explorer which you can find here:
http://developers.facebook.com/tools/explorer/