As facebook upgrades to v2.0 and making most of the data confidential now, how can i get user details like username, userid (Not app-scoped ID)
Any help would be highly appreaciated.
The username and real user_id will no longer be returned by the Graph API 2.0, as either would reveal the user's real profile. The only way to determine who the user is now is to follow the new link in the data:
https://www.facebook.com/app_scoped_user_id/xxx/
This is mainly done to prevent certain developers from sharing user_ids with third-party apps and ad networks.
Related
Our application (kind-of got legacy) has been using IG API to authorize users (by using the uid attribute returned from IG's callback API response) and we have left email as an optional param (safe to assume that there are many users in the application database without email IDs persisted)
With new Instagram Basic Display API (advised), it's mentioned to use Facebook Login for authentication purpose. But I am facing a major problem of identifying existing users now (since the uid will be different).
Also I have a doubt on what will have happen for users having instagram account without linking their Facebook account to it?
I could not find a proper explanation or a documentation for seamless migration for my situation.
Please help with sharing the right resource or guidance to achieve the same.
I am trying to fetch friends profile pics of a logged in user.From Graph 2.0, userfriends permission will fetch only the users who are using the app. However, I am surprised to see nametests and meaww apps are fetching friends profile pics, I see they are asking just email, publicprofile, userposts and friendslist permissions.
Any help in this regard is greatly appreciated.
I assume they are using taggable_friends or invitable_friends which Facebook will only allow to be used after submitting for reviews. Link for submitting to facebook for approval Both these apps are something that increases user engagement and activity in Facebook so Facebook will approve this to developers that look promising and well designed.
It's possible to use facebook info, and get some information in the local database in the userinhfo api?
Let'me explain, I get name and mail from facebook claim, and I want the userinfo api returns that information, and local information in the local user store.
Becouse I have the user facebook email provisioned in the secondary user store, if the user is in the PRIMARY user store, userinfo works perfectly, there are some way to work with secondary user store. And my secondary user store is a custom implementation of jdbc user store.
Thanks
This is possible to do. What you can do is authenticate the user using wso2 IS. Since you use custom implementation, the claim mapping should be done accordingly. If the claims are not there create custom claims.
Try to use those claims to map the Facebook user information
Or you may want to use facebook SDK to get user information.
I am using Waterlock to authenticate users in my Sails.js backend API for a mobile app that I am building. I think I'm experiencing a bug that isn't allowing me to save additional user data from Facebook such as email, profile picture, friend list, etc.
Regardless of whether this is because of my own error, I would prefer to make calls of my own to the Facebook graph API so that I can add the data to my own model but I can't figure out how to get my hands on the user token. Any ideas?
Thanks in advance.
I have a web application that I would like to add single sign on capability using user's Facebook or Google+/Google App account.
I have a USERS table that stores users login information. All users are required to have a record in this table no matter if they signed up using FB or Google+.
I am trying to figure out the information that I need to store in the database in order to link USERS table records to FB or Google information.
Facebook documentation states:
the app should store the token in a database along with the user_id
to identify it.
So should I create a table called SSO_LOOKUP with following columns:
USER_ID // user's id that links to my USER table
PROVIDER_ID // user's FB or Google account id
PROVIDER_TYPE // indicates if it is Google, FB, Twitter, etc.
ACCESS_TOKEN
For SSO login definitely you need to have your user_id and some basic details which allow you to connect to FB or google
provider: "it will be either FB or Google or anything in future"
token: "This token we receive from FB and Google. In case of FB it
expires after 3 months or so where as it does not expire for google
as per my knowledge"
token_expired:" As In FB token expires after a time so you can have
this flag in place if you need to refresh it after that duration"
user_id: "This is your User id:
uniqueid: "This is the Unique ID which you will get from FB and Google.
That helps to identify your user in FB/Google"
These are the minimum fields you can add and these will even help you to scale your app. In the sense if you want to pull or push data from google and FB at that time Access_token and unique_id will help you.
Also incase you want to see some publish source then you can see some of the code on github e.g.
django-social-auth
For some details you can refer google documentation and Google OAuth2
Hope this will help.
Technically speaking all you really need to store is the Refresh Token and some kind of flag type identifier that tells you if its a Facebook or Google Refresh Token. Then you can query the API for what ever information you need. Storing the User Id would be a good idea becouse if they logout then reauth you will still know who it is even though the refresh token has changed. anything else is kind of over kill really as you will be getting that information back from the API anyway when you make your calls.
You could if you want store there Name and most recent picture that might be nice to display before you have fetched there information. Then update any changes to your data after you access the API for the first time. But its basically up to you how you want to design things, and what kind of application we are talking about here.