title: Get Facebook User ID from app-scoped User ID
body: <p>With the upgrade from Facebook Graph API v1.0 to v2.0, Facebook is using "App-scoped User IDs", so I cannot see the "original" user ID inside my apps anymore.</p>
  
  <p>I always used the Real Time Updates and graph API calls like "<a href="https://graph.facebook.com/%7BpostId%7D/comments" rel="noreferrer">https://graph.facebook.com/{postId}/comments</a>" to analyze user activity on the Facebook page where the app was. But since these data contain the original user ID, I'm not able to match the activities to my registered users anymore!</p>
  
  <p>So is there a way to get the original Facebook user ID from an app-scoped user ID? Or the other way round?</p>
  
  <p>EDIT:</p>
  
  <p>I ended up fetching the app-scoped IDs for all my users using the API method mentioned here: <a href="https://stackoverflow.com/a/29154912/3432305">https://stackoverflow.com/a/29154912/3432305</a> and stored them in my database in addition to the old ID.
  Then, whenever an RTU arrived, for "old users" I would check which user has this app-scoped ID and process the update.
  At least Facebook managed to fix the bug mentioned in the comments (<a href="https://stackoverflow.com/questions/23805866/get-facebook-user-id-from-app-scoped-user-id#comment36871552_23805866">Get Facebook User ID from app-scoped User ID</a>) a few days before the API v1.0 was deprecated, so for new users of my apps, it works like a charm. So far...</p>