My app is live streaming to Facebook and comments are being fetched by via the URL (endpoint):
var urlComponents = URLComponents()
urlComponents.scheme = "https"
urlComponents.host = "streaming-graph.facebook.com"
urlComponents.path = "/\(self.objectID)/live_comments"
urlComponents.queryItems = [
URLQueryItem(name: "access_token", value: accessToken),
URLQueryItem(name: "comment_rate", value: "ten_per_second"),
URLQueryItem(name: "fields", value: "message,created_time,attachment,from{id,name,picture}")
]
All comments are being received, however, not all the comments contain all the data fields that were requested.
The name
and from
fields do not appear for some users. I have tested the app and found that the missing fields don't appear for users who haven't added the app into their Business Integration
.
What I tried:
- Read the docu for live_comments - the documentation does not state that there are any requirements besides the permissions and correct access token.
- Read other SO posts - other questions were solved by adding a page access token because it was not a timeline (destination) issue (1,2) or the Facebook app was in development mode.
- Searched the Facebook Developer Community Forum - I have found several posts with the same issue without any answers.
- Checked if all required permissions are provided:
"manage_pages" "publish_pages" "publish_video" "user_videos" "publish_to_groups"
- Checked the Graph API 8.0 version changes.
- Checked that my stream is public.
- Checked the accounts which commented on my live stream for any privacy settings which would block user data usage.
I have reported this to Facebook as a bug, but I am lead to believe that it's something in my code or understanding of privacy-related changes (some tested streaming apps receive all comments, while others don't).
EDIT 1 (12.03.2021.):
It seems like a Facebook API bug. The support will assign it to the dev team.