Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get user that made the comment in facebooks instagram graph api

Im building an application that manages comments for instagram business profiles, and i'm a little surprised that there doesn't seem to be a way to get info of the user who made the comment.

The docs seem to point this way too:

Reading a Comment

To read an individual comment's metadata, send a GET request to the /{instagram_comment_id} node and include any of the following fields:

...

user (only returned if the user making the query also made the comment)

So, am i to understand that there is no way to get the info of a user which made a comment on a media of the profile i manage or is there something i am missing? any help would be appreciated.

Thanks in advance

like image 331
msambarino Avatar asked Dec 15 '17 14:12

msambarino


2 Answers

This url worked for me:

v3.0/{comment_id}?fields=id,timestamp,username,text

like image 69
Maryam Zakani Avatar answered Sep 17 '22 15:09

Maryam Zakani


somehow I was able to get the username from graph API, but I'm not getting the fields name, profile_picture_url, etc. this is my URL for getting the username.

GET https://graph.facebook.com/v2.11
    /123?fields=mentioned_comment.comment_id(456){user{id, username}, text}

123 - instagram_business_account id

456 - comment id

You can get full user details from username by Calling Instagram API(Maybe it's against there privacy policy). suppose stackoverflow is the username, by calling this API you will get full data.

https://www.instagram.com/stackoverflow/?__a=1

like image 31
Anjal Saneen Avatar answered Sep 18 '22 15:09

Anjal Saneen