riseres
riseres

Reputation: 3172

Messenger Bot: how to get id, name and user's profile picture url?

I have Messenger Bot and want to do this action.

  1. User click Button Template(URL) .
  2. Messenger opens new tab
  3. On Web app header display header with fullname, display Picture

All these data are public data ex: user fullname, picture url to display. I know can use Graph API with USER_ID,

BUT In Messenger Bot can get only SCOPE_ID, so it cannot be used in graph api.

Any way to achieve like this
and No login required.

Upvotes: 3

Views: 10641

Answers (1)

Hossam.Youssef
Hossam.Youssef

Reputation: 136

In order to use the User Profile API, you can make a GET call to

https://graph.facebook.com/v2.6/<USER_ID>?access_token=PAGE_ACCESS_TOKEN

<USER_ID> is the page-scoped ID PSID that returned with any messaging object

Upvotes: 12

Related Questions