How can I tell if someone is a friend of mine in Facebook Graph API V2.0 and above? - facebook

In my App, I go through different groups and pages, and check public posts that were posted by people that haven't installed my App.
How can I tell if a person that posted something is a friend of mine or not?
I am well aware that \me\friends returns only the list of friends who also installed my app, I don't want to get the full list, only check a specific person.
I am also well aware that Facebook currently returns app-scoped Facebook ID of a user of enters my application, but also returns public data about people using their non-app-scoped FB ID - however without this simple piece of info.
Thanks in advance

Unfortunately this is not possible until both persons have given your app the user_friends permission.
See
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends#readperms
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends#readmodifiers

You can't. The other user needs to login to your app and approve user_friends permission to your app. Otherwise it means they they have not approved it and you will not get the information

Related

Getting facebook page with app_scoped_user_id is not possible anymore?

Below url gaves the user's facebook page till yesterday. But it's not working anymore.
https://www.facebook.com/app_scoped_user_id/xxxxxxxxxxxxx/
Is there any way to get user's facebook page or it's disabled for a security reason?
Unfortunately, Facebook have chosen to disable the ability to resolve app scoped user IDs, so this feature is now gone. Seems they havent yet responded to people registrered to the bug to let them know.
https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/
There's a new permission in Graph API 3.0 that provides a URL link for a facebook profile:
user_link
In order to use that, you have to submit your facebook app for review (and likely have a legitimate reason you need this information.
Update: I went through this process, our app got approved for user_link permission, and it works as advertised.
The user_link variable is an app scoped link that will work as long as the app remains approved, and will stop working if the app should get removed or they revoke the approval. So it's a special URL that really only works as long as the FB app is around.
https://developers.facebook.com/bugs/2054375031451090/
Subscribe to that bug to get updated on the status.
There is also a blog entry about this: https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/ - so this is actually not even a bug.
This is no longer possible and will not be, according to https://developers.facebook.com/blog/post/2018/05/01/facebook-login-updates-further-protect-privacy/
Your best bet going forward is to open the Facebook site and search for the user name like so:
JavaScript:
Assume user is an object with a property called name that contains the user's name.
window.open("https://www.facebook.com/search/str/".concat(encodeURIComponent(user.name)).concat("/keywords_users"));
In most cases this will allow you to quickly find the person in question, given that you can still display their profile picture using the app-scoped ID on whichever site lists users. It's not great, but it may be of help to someone. We've resorted to this solution in our CRM.

How can I uniquely Identify facebook user

How can I get the global facebook link
https://www.facebook.com/5
using v2.2 of facebook API,
Actually my application needs facebook friends and their globally unique facebook ID, I am thinking to get the friend names using taggable API but how can I get the unique facebook ID? or it is not possible at all ?
If somehow I get this global link for a user, I can extract the global ID
https://www.facebook.com/5
(I know its not possible using their API directly, but there must be some workaround that one can use)
Since v2.0 of the Graph API, you can´t get the global ID or the global link anymore for privacy reasons. You can only get App Scoped IDs, but those are unique in one App and good enough to detect returning users. Also, you can´t get ALL friends anymore, for anything else than tagging or inviting (which is only available for games with a Facebook Canvas implementation). No App should know about users who don´t even use the App.
taggable_friends is for tagging friends only, you are not allowed to use it for anything else and you would need to get it approved by Facebook before going public anyway. And there is no way you would get it approved for anything else.

facebook api get friends likes returns empty array for some friends

i tried this with fql and the test console
https://developers.facebook.com/tools/explorer
checked the permissions
check with two accounts (no privacy issues)
checked the fb bugreports
clicking on friends then a user id then likes returns an empty array on some of my friends. i couldnt figure out why this is the case.
it seems to be pretty random but maybe i overlooked something
can someone help me on this?
If some person means Your app works fine for facebook developer account and other accounts not - check on You facebook developer account Status & review if Your app is On for public and not blocked for review.

Developing a new app using facebook friends list

I am looking at developing an app that will make use of Facebook and have a question. In order for the app to work it would need to not only access the user's friends list, but also the user's friends' friends list and beyond. It would only access the users who have also signed up to the app.
Thanks in advance
Samy
And your question is …? :-) If you want to know if it’s possible to get that information – well, as long as the friends have authorized your app, there should be no problem, even over several „levels” of friends.

Get a list of my friend's friends

I am building a small facebook app. In my app I am trying to get a list of my friend's friends. When I perfrom this I receive an error from facebook that I cannot select information about people that are not me (I was trying to retrieve my friend's friends )
Here is an example of what I mean:
User A - Uses the application
User B - Friend of user A and also uses the application
I want User A to be able to see a list of all of user's B friend's who are using the application as well.
Is there any way to get arround that? How can I do this?
The way to get a list of friends for someone is by using the friends.get API method. However, webdreamer is correct in that you can't just pick any Facebook ID you want and start pulling out friend information for that person. The person you query about has to have authorized your application... otherwise any app developer could find out anything about anyone on Facebook, which would be a privacy nightmare.
It's tough to tell exactly what you want to do though, as your comments say you just want the friends of a user, and your original question says you want the friends of the friends. The first is possible... the second is not.
For the first, all you need to do is have someone add/authorize your app. After that, friends.get will work fine with that user's session key, which will be provided to your application, and you can get a list of their friends.