Is it posible to use facebook graph api to list a page feed without authorizing APP - facebook

I want to access next
graph.facebook.com/pagename/feed/
but I don't want the app to ask the users for permissions, since this information is public available. Is it somehow posible? Until now what I get is:
fbtrace_id
"G69vv730PRn"
message
"(#200) The user hasn't authorized the application to perform this action"
type
"OAuthException"
With an access token generated by explorer.
What I want to do is next:
A user input the page name or id, retrieve last posts, and then for each post retrieve likes and comments.
I mean can't I do something like:
http://graph.facebook.com/v2.7/pagename
and get page information?

Related

get the "FROM" field using Facebook Graph Api on comments for a facebook page

first of all, i own the page and i'm the only admin
so i have to get the access_token of my page (after the last update of facebook) :
/{page_id}?fields=access_token
so this is the url i'm using to get the information of my desired comment:
/{comment_id}?fields=id,from,message&access_token=my-page-token
and still, the response is showing only the id and the message.
i don't know how to access the user information
i'm using the access token to do so as mentionned in the facebook api docs and i own the page
what am i missing?
Since the latests update in the Graph API, to get private information from the users, even the author of some public post. You need to get the auth token with the manage_pages scope to get permission to the page itself then get the app reviewed ( https://developers.facebook.com/docs/apps/review ) and last you must go thru the Business Verification or the Individual Verification.
The last is a legal contract to use the info.
After that something else. You have to ask the page-specific access token. That is in the /me/accounts , that will give you a list of pages that has given you access. One of the fields is access-token or something like that. With that token you must ask for the comments with the FORM field.
Here I explain the details:
Facebook Graph API: How do I get “from” field in comment

How to get user likes and other public data

I am trying to get Facebook public data such as users and groups using the search functionality in graph API. I used long live tokens and also I have granted permissions for my app. Till now, for searching based on user details, I am only able to get the following.
User Name
User Id
For groups and pages:
Id of group or page
Name of group
Category.
But although I have granted permissions in my access token I am unable to get data such as "likes", "comments" etc. Its showing empty data set. How should I proceed so that I can get these information ?
I think you misunderstood how the permissions work. With an access token, you can only query the detailed information for the user which "created" the access token by giving his permission to use the set of his data.
This is not at all valid for all other Facebook users.

Can't get public info using Facebook Graph

I'm trying to get public profile using user_token. I registered FB app and get user_token from page: https://developers.facebook.com/tools/access_token/
but when I try to get public profile https://graph.facebook.com/100000378611443?limit=1000&access_token={user_token}
I see an error:
{
"error": {
"message": "The global ID 100000378611443 is not allowed. Please use the application specific ID instead.",
"type": "OAuthException",
"code": 2500
}
}
But if I use user_token in above URL from another my app I can successfully get public user profile.
What am I doing wrong?
Thanks.
Since v2.0 of Facebook API apps are no longer allowed to use global IDs, just app-scoped ID. These ID are generated when a user logs in onto your application.
If you are attempting to retrieve current logged in user's information, you should use /me endpoint along with the user's access token: https://graph.facebook.com/me?access_token={user_token}
Note that with these new scoped IDs, apps are not allowed to retrieve any data from users who haven't gave permissions to the app.
Cheers
You can still use the older version of Facebook Graph API V1.0 which will continue to exist until April 30th, 2015.
https://graph.facebook.com/v1.0/100000378611443
You must use access token, not user token! You can obtain one from Graph API Explorer here https://developers.facebook.com/tools/explorer
Then you must have at least user_about_me permission to get profile data. As many user data permissions you have, as many endpoints and data you obtain. Keep in mind, access token you get from Graph API Explorer is short living - expires in an hour or so. More about tokens and their terms here: https://developers.facebook.com/docs/facebook-login/access-tokens
Happens to me too, trying to using "Graph Api Explorer" with an user id obtained debugging my application.
User id that obtain from a call as:
../<event_id>/likes
isn't REAL user id, but a kind of id "encrypted" (let me use the word) with access_token.
So if you wanna test that user id on GAE, you need to specify also access token:
https://graph.facebook.com/<user_id>?access_token=<application_access_token>

Facebook Graph API location data missing, but visible on FB site search?

I'm noticing an inconsistency with the FB Graph API.
Suppose I'm logged in (and have access_token for) user Bob. Bob isn't friends with user Jim.
If I, as Bob, via the Graph API, ask for data about Jim:
https://graph.facebook.com/jim?access_token=blah&fields=location,hometown,name,id,address
I get a structure like this back:
{
"id": "1",
"name": "Jim"
}
Note that the fields that I've requested are conspicuously missing.
However, if I log in to the FB website as Bob, and then search for Jim, I can see his location and hometown on his "About" page, even if I'm not friends with him.
Why is this? Is there some additional token permission I have to specify or field I need to ask for in order to get this data (which is evidently rather public) from the API?
Got stuck on the same issue.
As I understand from end of this page access token has to include user_location and user_hometown permissions. Tried it in api explorer but had no success - still was not able to see location information through api for users that had this info visible on their profile page.
update: answers here and here suggest that data access through api / app is more restricted than through webpage to prevent web mining. I assume it is the case regardless you use user or app permissions.
If you are using a user access token then you might need to switch to using an app access token retrieved by a call like:
https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials

Using FQL to retrieve facebook status's of all users who are using My Facebook Application

I would like to retrieve status's of all users who are using my Facebook application.
I am not interested in retrieving the user's friends statuses only interested in retrieving the users who are using my Facebook application and have granted my application the "read_stream" permission.
I can successfully retrieve status's of the logged in user or one of the logged in user's friends by calling:
SELECT post_id, message, attachment, type FROM stream WHERE source_id = "SOME ID" AND type IN (46, 247)
But that is not my goal. I would like to get "All" users who are using my Facebook application and get their latest status feed without any particular user being logged in.
For example: I am not logged in facebook now neither or you. But when you click the link below you will get an RSS Feed of this particular user. This user is actually a business page so it is open to the public. Click This Link
I would like to retrieve this information from users who allow my application "read stream" permissions.
I cannot retrieve this information on personal Facebook user pages. So I am under the impression I need to build a Facebook Application to do so.
There is no way to retrieve a list of the user IDs of your app's users, and if you already have the user IDs you already have the correct query format - you just use the access token from the users to make that call
The fact you can't retrieve a list is covered here: Facebook. How to get list of all users of my app?
If you need the status updates of all your users, you should probably be using the Realtime Updates API to get a notification sent to your app when the user adds a new message, you can then use a cached [and still valid] access token for that user to retrieve the new messages