Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Users App-Scoped user id in Facebook Graph API

In advent of the new V2 Facebook Open Graph API, I need to make note of the logged in users 'App-Scoped' user ID, in order to register the id with Parse in order to receive PUSH notifications.

However, as the logged in user I get the Facebook ID instead.

Haven't found anything in the docs to solve this problem yet, so thought I better ask here.

like image 367
David van Dugteren Avatar asked Dec 15 '22 23:12

David van Dugteren


1 Answers

  1. If you created your facebook application before the introduction of graph API 2.0, It will continue to receive the canonical facebook user ID
  2. If you created your facebook application, after the introduction of graph API 2.0, It gives you app scoped id instead of the canonical id.

In this case I assume your application is quite old.Therefor create a new app and it will give you the app scope id.

like image 110
Sasanga Abeywickrama Avatar answered Dec 27 '22 04:12

Sasanga Abeywickrama