How can I uniquely Identify facebook user - facebook

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.

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

get Facebook user ID with username without graph api [duplicate]

I would like to retrieve a Facebook user's id given their username.
Example: Given helloworld return 100003263065603.
I understand that the Graph API does not allow this anymore, but several sites, such as lookup-id and findmyfbid are able to do this.
I am guessing they are doing some sort of scraping? If so, how would I implement this in Node.js
Those sites most likely scrape the profile page, which is not allowed. Don´t do that, should not need to anyway. Just let the user authorize your App and you will get his (App Scoped) ID. There´s no serious application for using the username or his global ID anymore.

How app_scoped_ids will be used on custom audience after May 1st?

On custom audience, there is the possibility to upload a Facebook ID list for creating an audience... After the Graph API v2.0 migration, when we won't have access to Facebook ID anymore, how can i upload the user id list? Can i use a app_scoped_id based list?
If someone publishes something on my fanpage, and i get his post using Graph API, will i be able to use his id on custom audience? The official documentation don't make itself clear when explaining about the "expiring process" of a app_scoped_id. As far as i understood, when someone authorizes an application, his app_scoped_id will be "permanent", but if there is no user interaction/authorization with my application, the app_scoped_id CAN expire in 24 hours... is that right? If so, how can i use a list of ids on custom audience if they expires?
Thank you!
UPDATE
From https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids:
For users who have not logged into your app, the user ID may change depending on the version of the API that you call. In v1.0 of the API users who have not logged into your app will be referred to by their original Facebook user ID, whereas in v2.0 they will be referred to by an app-scoped ID.
We've added new API endpoints that allow you to tag and invite friends who don't use your app. These APIs return tokens which may be used to generate custom interfaces for tagging and invitations. Those tokens aren't meant to be cachable and we make no guarantees that they will be stable beyond 24 hours from the time the API response containing them was received. They aren't the same as either the IDs used on data for people not logged into your app nor the same as the app-scoped IDs.
You are confusing the app-scoped IDs with temporarily generated IDs. App-scoped IDs will not change over time. Temporarily generated IDs are meant to help with inviting and tagging friends who have not authorized an application and as such they will not remain the same over time.

How to add facebook friends searchbar in website

I am learning facebook php and javascript sdk. I am trying to create a facebook search friend bar in my app where user types friends name and as user types, the searchbar should display most appropriate result while user is typing. Similar to what facebook search bar does. Is there a social plugin or any other tool available to acieve this task? To achieve this, I tried facebook comments plugin with user_friends permission. When user writes any friends name followed by # sign on comments field, facebook gives most appropriate result. But I dont know how to get what user wrote on comments. Any pointers will be helpful.
FB introduced API versoining. If you are going to create new app it will use version v2 and you will not get full friends list from me/friends.
/me/friends returns the user's friends who are also using your app
In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.There are two key use cases where apps need access to non-app friends: tagging and inviting. In v2.0, we've added the Taggable Friends API and the Invitable Friends API to support these flows.After a person has logged in with v2.0 of Facebook Login, calling /v1.0/me/friends and/v2.0/me/friends` will both result in the v2.0 behaviour - both calls will return the set of the person's friends who also use the app.
Read this documentation
https://developers.facebook.com/docs/apps/upgrading
Either you can create this by yourself (not too much of complex). You have access to the friendlist, so you can get all the friends with /me/friends. You can store them (their name/info) into a variable in your application and implement search. This will make your facebook api concepts better.
Or there are many friend selectors plugin/codes that you can integrate in your application. But you'll have to modify them accordingly since you dont want to show a pre-populated list of friends instead you want to implement search.
I've used mbrevoort's multi-friend selector in my applications.
But if you just want to implement search, implementing on your own would be really easy and less complicated!

Graph API get information on facebook link shared

is that possible we can get the information from facebook API whether graph or REST or FQL regarding user sharing. Such as video or post or anything can share via facebook and it is shared by a list of user, with profile id or user name. I found something like this http://appshack.tv/2011/03/likes/ but it is just the counter, lack of information. Any way can do? Coz I found that facebook not stated everything in the documentation. Some trick is found from third party side.
No you can't get the user ids. Facebook will do their best NOT to share the user id with you "unless" they (the users) authorize your application.
And guess what....you can't even get the list of the users who are using YOUR application! (You can only get the count!)
Check this answer.