Graph API - how meaww and nametests get my friends list without taggable_friends? - facebook

I've recently applied for taggable_friends permission and it was denied. I understand that this permission is only for tagging user's friends and if I want to get the user's friends who also use my app, I have to use user_friends.
But I am confused here because, I've recently discovered that a lot of personality test websites can get my friends who doesn't even use ( or used in the past) those apps (i.e meaww.com/activities/question/batman_twin_yours/2355). And the core intention of these personality testing websites are not tagging, just sharing the result in the user's timeline.
I believe the apps of the above mentioned websites, do not have the taggable_friends permission (since they do not ask users to tag anyone) or is of version 1.0.
Is it at all possible that anyone can suggest me how I can get a user's friends' profile pictures and names like those websites?

As #CBroe says: You can't.
I am currently building 'funny' ('bullshit' or 'humoristic' are maybe better terms to describe them) - tests/quizzes and I am trying a workaround:
get a list of the users' (endpoint: /me) -profilepictures. (Requires 'user_photos' permission)
$response = $fb->get('/me/photos?type=uploaded&fields=id,picture.width(800).height(800),link', $accessToken);
Than scan for likes on those pictures.
$response = $fb->get('/'. $tmpId .'/likes', $accessToken);
In the likes are id's and names of users.
It's not a complete friends_list - but if you are like me, OK with just 'some' friends to display something 'useful'...
(With the user_id you get the public profile pic)
Hope I could help!

Related

How to get my own Facebook user timeline using Graph API?

I would like to get all the posts and updates that are normally displayed in FB official application for MY account (this includes updates from my friends and liked pages).
I wasn't able to find any details how to get that, the only thing I've managed to get is my own posts.
Anyone got any experience with that using current Graph API verion (3.3)?
All the alternate FB clients (ex. Friendly) must be doing this somehow.
There is no way to get ANY data of users who did not authorized your App. Which means, there is no way to get posts of friends. You can only get your own friends, with the user_posts permission and the /me/posts endpoint. If some Apps access friend data without their authorization, they are most likely doing something that is not allowed.
Here is what I found in their API docs:
There are two scopes:
The user feed requires the user's permission
The public feed has fewer capabilities but doesn't require perms

Facebook API - Friend List

I searched the internet the whole day for this, and came to the conclusion that there is no way to get a user's full friend list since API 2.0 (correct me if I am wrong).
What I want to do is, given the app user and another facebook user, generate a report about their "second level" mutual friends. That is - (friends of mine) who are friends with (a friend of his). Illustration:
Is this kind of thing possible after facebook's restriction since API 2.0 in any platform (Different SDKs, Facebook's Graph API, etc)?
Many Thanks.
This would be the API: https://developers.facebook.com/docs/graph-api/reference/user-context/all_mutual_friends
There is no way to get friends (or users in general) who did not authorize your App. Every list you get will only include users who authorized your App.

How to get a list of people who have checked into a place in Facebook

I'm trying to use Facebook API to get a list of people who checked into a place.
When typing in the search box in Facebook UI People who have been to THE_PLACE I get a long list containing many people, also people who are not my friends or friends of friends.
However, when I try to get the same information from the Facebook API, I get a list that only contains my friends who checked in. The FQL I used is the following (and also some other variants that didn't do better): SELECT author_uid FROM checkin WHERE target_id = THE_UID_OF_THE_PLACE
Am I doing something wrong or is this simply impossible to get via API the same information I can access through the UI?
For privacy reasons, this is not possible at all. Also, FQL is deprecated. I have answered a similar question here: facebook graph API - get last checked users to place/page

Get all posts on a friend's wall

I'm trying to find an API call (or set of calls) that will allow an app to get the posts that one would see if viewing a friend's wall. Either a REST call or a FQL call would do.
I tried /feed and /posts, compare the results with what I see on my friend's wall, and the results I get from it are incomplete.
I know this is possible because apps like Friendly are able to do it.
Any hints?
Well, there's two different API endpoints for querying the posts of a given user; home and feed. Home includes posts from other people and pages (basically what you see when you log in and go to your home page) and feed is the stuff the user is sharing. Assuming your application has authenticated the user and they've allowed the read_stream permission, you can then make queries to the Graph API using their access token:
https://graph.facebook.com/{SOME_USER_NAME}/home?access_token={SOME_ACCESS_TOKEN}
and
https://graph.facebook.com/{SOME_USER_NAME}/feed?access_token={SOME_ACCESS_TOKEN}
The only hint I could give you is that "incomplete" is pretty standard with the Facebook API. You can only do the best you can with what they give you. Counts will be wrong. Data will be wrong. It's a fluctuating, moving target, so code to that fact.
You can interact with posts by retrieving the read_stream and publish_stream for a given User's ID.
Once you have the ID of the User that you are interested in you can use FQL to retrieve posts from streams that you have the permissions for.
This stackoverflow answer goes into more detail and contains further links to the documentation on the Facebook Developers site.
We do it like this:
1) we use Facebook Platform PHP5 client
2) then what you do is:
$this->facebook = new facebook($key, $secret);
$out = $this->facebook->api_client->call_method("facebook.stream.get", array('viewer_id'=>0, 'source_ids'=>$uid, 'limit'=>$limit));
then just operate with out, which contains all posts on asked page.
but, afaik, it will work only with pages, not with normal users. but dig that way to get answer.
You should make a graph call to https://graph.facebook.com/< FBID >/statuses?access_token=xxxxx
Here access_token shall have read_stream permission and offline_access permission ..

possible to fetch #mentions thru Facebook API (like thru Twitter API?)

I'm looking to implement a feature where I am able to collect #mentions through the facebook API in a similar fashion to the twitter API.
Specifically, if I run a group called foo, and other people on facebook mention #foo in their wall posts, I'd like to fetch and collect the text of that particular #foo mention.
I can't find any relevant documentation on Facebook....
I think you cant do this, the privacy policy on Facebook is much tougher than Twitter. Even application which being installed need to explicitly ask for permission to read wall posts. if your application has read_stream permission from user then you can read his/her wall posts with API, and you can search for your group name there.