Seemingly simple question but I found no obvious answer so far.
I logon to Facebook.com using my browser. I go to the search bar, type in 'Obama'. Then Select 'Public Posts' on the left hand side bar, which starts listing all PUBLIC posts. I pick up one of the posts that shares a like/photo and has a URL like this : 'www.facebook/com/story_fbid=&id=. I figure out that abc is the user_id and xyz is the object_id. This also means that the post_id is abc_xyz.
Then I go to the graph.facebook.com API explorer, generate a user access token, then type this query:
https://graph.facebook.com/fql?q=select post_id from stream where
post_id="abc_xyz"
NOTHING.
I even try
select link_id from link where link_id in ("xyz", "abc_xyz")
still NOTHING.
So, What is happening here? Some posts on StackOverflow talk about how facebook's public posts are not truly public - BUT, there is no reference to this in the official FB documentation.
Then, I tried creating a new account, creating post on my wall, making my wall posts public, then I tried the same queries as above, and yet again NOTHING (just an empty dataset).
Guys, are there any official explanations to this behavior? When I am logged in as user, I AM NOT an APP!/ROBOT, but just an end user - I can see a public post/link/share/photo, then why on earth can the API not do the same? What can I do, to make a PUBLIC POST, MORE PUBLIC?
I believe the answer to this question answers my question: Trying To Read Friends Links in Facebook Using FQL: Why do some friends return an empty set?
Facebook's users are allowed to set separate permissions for apps, so even when I am using the graph api explorer (which is an app) or the api directly (which is equivalent to an app), any public links/photos are only available to these apps when the original author of these links/photos/status has NOT unchecked it from "How people bring your info to the apps they use" setting under privacy settings.
I experimented with a test fb account, shared a link (with the default privacy settings), and I was able to query it using FQL on the link table, and then, I turned off 'My Links' under privacy settings and this time the same query in api explorer returned empty set.
So, the answer to my question "What can I do, to make a PUBLIC POST, more PUBLIC" would be that I can't do nothing about it - it is a setting that the user who posted this public post controls. When it is at default, I'll have access to it, when its not, I won't.
Hope, this helps others looking for similar answers.
Related
I'm using Facebook for many years, and I've liked and commented a lot of friends posts (status, photos, etc). The problem is that I didn't pay attention to that these posts were "public" or "for friends only". As a result, a person who is not a friends of mine can now see all these contents using a request of Graph Search like:
Photos liked by USERNAME
Posts liked by USERNAME
Posts commented on by USERNAME
...
Of course I could remove likes and comments one by one from the Activity log, but it would take several months... I could also use the Toolkit for Facebook available on Chrome, but unfortunately it only proposes to remove ALL likes or comments, of any kind, whereas I want to do it only for public ones.
Edit: This Chrome pluggin is actually a fake, don't use it!
Is there a way to do it with Graph API?
This post seems to mention there isn't, but I'm not sure. I found this post for instance.
Edit: #CBroe confirms "Facebook has recently removed the ability to (un-)like objects in the name of the user" so I guess the latter link is obsolete?
Admitting we've retrieved the posts or comments ID, for instance by parsing the html response of the Graph Search result, then:
Is there another way to launch a request to FB which unlikes or removes posts/comments?
What do you think about it?
Thanks!
I used to be able to go to my Facebook profile page https://www.facebook.com/{Username} and replace the "www" for "graph" https://graph.facebook.com/{Username}.
The answer to that used to be my real facebook ID and some other info, but now I get:
{
"error": {
"message": "(#803) Cannot query users by their username ({Username})",
"type": "OAuthException",
"code": 803
}
}
Yesterday I made the exact same thing and it worked, but today it doesn't. Is there any other way of finding my ID? Does it work for anyone?
For finding any facebook group_id or page_id or user_id go to inspect element of page and find these in meta tags.
Group Id
fb://group/Here_is_your_group_id
Profile user_id
fb://profile/here_is_your_user_id
Page Id
fb://page/here_is_your_page_id
graph.facebook.com/{Username} is not available now but lookup-id.com still can find your facebook ID
There are already 3 exact same questions in the last 2 hours. Please use the search function of StackOverflow before posting a question!
You cannot get the username field anymore. This is very well documented in the Facebook docs.
See
graph.facebook.com/username does not work
If you only have your user ID, the simplest way would be to use an online service (like this one: http://getuserid.com) and paste your Facebook username.
If you need the user ID by programming, this is different. You could in this case parse the HTML code of the page (CTRL + U will show you the HTML code of the page) and search for the term entity_id, which is the user ID. You could then use regex to extract the information.
There is no way to get your Facebook ID via the Graph API!
You can use a regular expression to find your Facebook ID. If you paste the source of a profile page (or page/group) inside http://regexr.com/3gi7q it will match the Facebook ID for you.
It is using the following regex to find the Facebook ID:
/fb:\/\/profile\/(\d+)|fb:\/\/page\/\?id=(\d+)|fb:\/\/group\/\?id=(\d+)/;
You can also use the tool i created and just fill in your profile url: https://commentpicker.com/find-facebook-id.php
Go to your Facebook profile and right click on your cover photo, if you copy the URL it should have your Facebook id in it like so. fbid is what you want. I don't there's any AIP for it anymore. Looks like Facebook may be finally phasing it out.
https://www.facebook.com/photo.php?fbid=1512641059003115&set=a.1376251679308721.1073741827.100007717054203&type=1
You can use the sources already identified or you can right click below the navigation bar and view page source. Use your CTRL+F (find) and search for [profile_owner"].
The number listed shortly thereafter will be your global ID. It will generally look like this:
[profile_owner":"10000320024513431"].
The # is listed multiple times (like 75) in the data and follows terms such as ["profile_id"], ["uid":], and [?profileid=] to name a few.
I always us this tool https://www.graphsearcher.com/ to find my personal facebook ID. Hope can help you.
Head over to here and authenticate with it, you can then use the Graph explorer to get your ID. You'll also need an access token to view the https://graph.facebook.com/{ID} page.
I just tested this for you and it works correct.
I can see FB source and above i can see my FB ID also.
I used https://graph.facebook.com/username and tested with firefox.
Maybe your using it wrong per accident?
It seems like code 803 means no valid username.
Are you really sure you are using a correct username?
You can also try below link to find your FB ID.
http://findmyfacebookid.com/
Good luck mate!
I am trying to build an app that fetch all the links posted on a Facebook page. I'll use the Kotaku page as an example (https://www.facebook.com/kotaku, Facebook ID is 273824104039).
I have tried to get the links via the graph API (https://graph.facebook.com/273824104039) or via FQL (here is the query I used: SELECT link_id, owner, title, url, owner_comment, summary, created_time FROM link WHERE owner = 273824104039), but both of them only return a subset of the links posted (20 as of writing this post).
(All request were made with an access token from my account that I granted the read_stream permission. I also 'like' the Kotaku page, but according to the documentation the links connection is available to everyone on Facebook.)
If you go on the page, it's pretty obvious that there are more than 20 links, but most of these were posted via the dlvr.it app and those are not showing in the queries above.
So does anyone know it there is a way to get those links as well? If possible, I would like to get all the links posted on that page not just the last 50 or from the last 30 days.
I think the issue is that links posted by apps aren't treated as native Facebook links, they're just posts with attachments, so you're not likely to find anything in links. With that said, try looking at the stream FQL table or the posts parameter of the graph.
I tried several options:
https://graph.facebook.com/me/likes ,
https://graph.facebook.com/me/links
and a couple of FQL queries - but none returned Likes a user makes via Like buttons on external sites.
Any ideas?
You just take the Extended Permission of user_likes, you will get what you are looking for....
I think that user_likes only give you the permission to see all real objects that the user likes:
a movie,a musician...
if a page is tagged as article for example:
it won't be shown in the likes request
https://graph.facebook.com/me/likes
cause there is no object in the social graph for it:
"Note that the Open Graph protocol is currently designed to support real-life objects. If your URL is a piece of content — such as a news article, photo, video, or similar — you should set og:type to article (see below). Pages of type article do not have publishing rights, and will not show up on user's profiles because they are not real world objects."
(http://developers.facebook.com/docs/opengraph/)
I am also looking for the same api request, I'll let you know if I'll find it...
Editing:
Ok I asked this question on Facebook:
http://forum.developers.facebook.net/viewtopic.php?id=94745
and there is no way of doing that.
at the time of this question, if you go here:
http://www.facebook.com/realplayer
you'll see six posts down, I have posted a photo with a message of "#highfive Cincinnati, OH"
but if you to either of these:
http://graph.facebook.com/realplayer/feed
http://graph.facebook.com/realplayer/tagged
the JSON that is returned seemingly includes everything on the wall, except for MY post. there is another photo post from someone else down below mine, and it is showing up (and both my photo and his photo are in the "Fan photos" section)
obviously, since I can see everything with these links already, it appears that access_token is not a part of the equation... BUT, some more info:
if I use an access_token from a session that isn't me, I can't see the post in the JSON
if I use an access_token from MY logged in session, then I DO see the post in the JSON
so I'm very confused.
if everyone in the world can see those posts on the wall without even authenticating, then I expect all of them to come back in the graph api as well.
anyone have thoughts on this?
I am aware of the "manage_page" permission... which I can use to get a list of accounts and special offline access tokens for those pages... and that's something I can explore... but it seems like alot of work when my post seemingly SHOULD be there in the graph
well looks like FB has this nice little anti-spam feature for pages... such that a non-admin can't write lots of messages on your page. what's interesting is that facebook uses similar "silent treatment" techniques that StackOverflow uses ( https://blog.stackoverflow.com/2008/09/podcast-21/ )... so when I look at a wall that I've been "spamming" I will see all of my posts... but no one else will.
I was able to create a new test account and get about 3 or 4 messages on a page before it started blocking me again
so probably the Graph API is working as designed :)
========================
UPDATE: this appears to only be part of the problem. I have constructed another page and app and been doing testing:
http://www.facebook.com/pages/RP-Test-Page/116735865065591
note the entry for "#highfive Orlando, FL" ... even an unauthenticated user can see this entry from the actual page... but there is seemingly no way for me to get it back through the API. He only posted once, so it can't be an "anti-spam" thing (you wouldn't think).
I have obviously tried the Graph API (with and without my own access token)
I have tried FQL (with and without my own access token)
and I have followed this post:
http://en-gb.facebook.com/topic.php?uid=10381469571&topic=3815&post=51980
in order to request manage_pages and offline_access extended permissions from myself and use that to get the /me/accounts and then get the "impersonation" access token (whew)... STILL NOTHING
there must be some other super security thing going on. is it not possible to reliably get all of the wall posts from a page?