Have you guys encounter this? Please let me know your thoughts!
The screenshot above is a response when I hit a get request to retrieve a comment from Facebook live. There are comments where the name of the user who made the comment does show up, but the majority of the comments don't have the name of the user.
Facebook documentation below shows field = from for the person that made the comment.
Facebook Graph API
The comments documentation state that the field from return a User object and my suppose is that either you don't have the permission to read all the User objects or maybe that user has set some privacy restriction; unfortunatly as you saw, the Facebook API Doc is not complete and I did not find more info.
Related
I was trying to get a list of invitations of the requesting user assuming that the user already invited as teacher/student from a certain class. Using the Try this API with a userId of "me", but the response is:
{"nextPageToken": "IgIQAg"}
I'm expecting to get all the invitations of the requesting/authenticated user. Any idea?
Looks like what you are experiencing might in fact be a bug.
There is this open issue on Google's Issue Tracker with regards to it. I suggest you star this issue here and eventually add a comment saying that you are affected by it.
Moreover, I suggest you double check if the user on behalf of which you are making the request does indeed have any invitations.
First time touching things about facebook.
Trying to do facebook 3rd provider login.
The developer I worked with is doing it through back end instead of how facebook's tutorial is doing it through frontend.
Right now the login works and able to get the return of
accessToken: "EAAaz15rigu"
userID: "10928"
Now trying to get the user profile such as first, last name and avatar.
I searched around and found this documentation
https://developers.facebook.com/docs/messenger-platform/identity/user-profile/#fields
https://graph.facebook.com/<PSID>?fields=first_name,last_name,profile_pic&access_token=<PAGE_ACCESS_TOKEN>
The thing is, there isn't <PSID>Page Scope ID and <PAGE_ACCESS_TOKEN> provided
So again, I searched for page access token
https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens
https://graph.facebook.com/{your-user-id}/accounts?access_token={user-access-token}
this is what I see so I entered what is returned from login https://graph.facebook.com/10928/accounts?access_token=EAAaz15rigu
What I see is an empty array though, even if the array is not empty as show in the sample in the documentation. I still don't see anything that is <PSID> that I can use from my backend to get user profile.
Can someone please give me a hand to walk through this?
Thanks in advance for any help / suggestions.
I'm a beginner on Facebook API but after reading up and understanding whatever I could I'm still stuck because I can't find any good documentation that is not outdated.
I'm trying to comment on my own post and I keep getting this error:
Publishing comments through the API is only available for page access tokens
I do understand that I require a page access token for the latest version of the API but even after getting the page access token I'm still facing this issue.
Here is a screenshot of my graph API explorer
Here I first clicked on get user access token and gave it all possible permissions. After that I clicked on get page access token and then tried to post the comment.
Note: The post was made by my ID and is visible only to me, I am sure that the user ID and post ID is correct because I am able to view its details
I also tried it using python with the token ID above and this code.
import facebook
graph = facebook.GraphAPI(access_token=token_id)
#This does give me the post details
#print (graph.get_object(id = my_id +'_10214865328931217'))
graph.put_object(parent_object=my_id+'_10214865328931217',connection_name='comments', message='Test')
But I still get the same error. Seems like there is something about the way page access tokens work that I do not understand.
All endpoints like for hashtag, work in sandbox and get info in json from within sandbox users in public_content scope with users info.
Yet "https://api.instagram.com/v1/tags/search?q=cat&access_token=..." brings me result apparantly out of sandbox, results I have not seen before, and only with items include "data: name, media_count", without user info.
Question 1, is it really getting out of sandbox, is it a bug?
Question2, why not user info then, cause I can use more info, Image URL for example, why not? am I missing something?
Thanks :)
https://api.instagram.com/v1/tags/search?q=snowy&access_token=ACCESS-TOKEN
This endpoint only gives you similar hashtag name and count for the search term.
Documentation here: https://www.instagram.com/developer/endpoints/tags/#get_tags_search
If you want all photos and user details for a hashtag then use this API:
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
When you open the Instagram APP you can look at your news feed where you can see that someone is now following you, likes or has commented on a certain photo.
When I look at the Instagram API (http://instagram.com/developer/) I can retrieve likes and comments when I request a certain media ID. However in order to know if someone has commented on a photo of mine I would need to scan all the photo's and request it's comments to check if any new comments have been made.
Does anyone know of a better way? Help is appreciated.
If it helps, content for "Following" tab is available at http://instagram.com/api/v1/news/, and "News" tab at http://instagram.com/api/v1/news/inbox/ (you need to be logged in to your account).
All URLs point to internal instagram:// protocol so you would need to replace them when parsing and there seem to be no pagination options.