Retrieving Facebook Live comment real time from my facebook live streaming - facebook

I am new to using Facebook Graph API and I am building a python script that retrieves the user's comments from my Facebook Live Stream real time. The Live stream is on my Facebook page and I am the admin of the page. I read that it is required to have page access token so i got one.
I registered an app which is linked to my Facebook page and got the Page Access token from the Graph API Explorer.
I tried to retrieve a past stream's comments on my page by using this.
https://graph.facebook.com/{post_id}/comments?access_token={page_access_token}
For Live stream it should be
https://streaming-graph.facebook.com/{post_id}/live_comments?access_token={page_access_token}
Only my comments had the "form" JSON object. Comments made by other users does not have the "form" JSON object.
It looked like this
{"created_time":"2019-20-16T10:24:11+0000","message":"3","id":"442894059672528_442896329672301"}
Instead of
{"created_time":"2019-20-16T10:23:27+0000","from":{"name":"User A","id":"117461359653242"},"message":"1000","id":"442894059672528_442895933005674"}
Is it something wrong with the permission or the page access token?
Edit 1: Does the app needs to be submitted and live on Facebook?

Related

How to create a Facebook Event using Facebook Graph API in 2022?

i'm trying to create a Facebook Event from Postman.
My project consists of an Event Management and Sharing System.
I was able to post a Facebook Posts of type text, link, photo, multi-photos, and video from Postman to my Facebook Page.
I'm confused about what i should do to create events through Facebook API.
At the page Event - Graph API Reference i read that "Access to Events on Users and Pages is only available to Facebook Marketing Partners".
At the page API Official Events | Facebook Developers i read that "we are temporarily pausing new integrations with partners, but you are welcome to complete the form below. Please note that responses to this form are monitored but you may not receive a direct response."
Should my company make a request to become a Facebook Marketing Partners or there's another way of creating events of facebook through Facebook API?
EDIT: i forgot to say that through Postman i'm able to retrieve an event performing a GET to https://graph.facebook.com/v13.0/980993592785922/?access_token={my_long_lived_user_access_token_with_proper_permissions}

Need knowledge on facebook API data retrieve

I want to know, wether can I get the Facebook Page Insight Data using FB app. I am newbie and want to get data of Facebook page of registered users.
All the data as well as engagement of all post on that page.
For this you have to learn about the graph API of facebook, but for scraping the data from page you can start by reading this.

Posting to a Facebook page on behalf of page using a Facebook application by anyone

I have a web page linked to a Facebook application where users can log in by their Facebook account.
I have also a Facebook page for my application where anybody can post.
What I'd like to achieve is the following:
- An ordinary user logs in to my web page using her Facebook account,
- She adds an information to my web page (for example a book name),
- That information is instantly posted to my application Facebook page under page's name (for example "this book is read by someone").
I don't want it to be posted by the user, I don't want it to be posted by myself (admin of the page).
I don't want to mention about the user, it will be anonymous information.
But I couldn't find a way to do it either as JS or PHP.
Any suggestion is welcome.
Many thanks.
You will need to get a page access token. https://developers.facebook.com/docs/facebook-login/access-tokens/
Get it, store it somewhere on your server – and then use it when making the API call to post what the user entered.

Which app do I need to display facebook feed?

I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.

Streaming Facebook Pages Wall (not just the pages posts)

I have looked on 100 forums looking for a simple answer for how to stream every post on a Facebook page's wall (not using the like box for just the pages posts, but everyone's posts). I am the admin of the page and I am already using the like box for my posts so I understand that, however the developer pages of Facebook are too confusing for such a simple task. I will be inserting the stream into an HTML page which will be hosted on www.1and1.com so it can handle most, if not all code.
I know it is a lot to ask but is there evem someplace online that will offer plain step-by-step instructions for my specific needs?
If the social plugins they make available aren't sufficient, you could just pull in the feed with the Facebook graph api using the javascript sdk (easiest) or there is probably an SDK for whatever programming language you know. For example, you can see a list of posts on the coca cola page using the Facebook graph explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=cocacola%2Ffeed
The /page/feed method needs an access token, but you can use the graph explorer to get an offline_access token that you can use to pull the data in. This may eliminate javascript sdk usage though unless you want to first prompt users to authenticate your application. But otherwise you would just parse the json feed that is returned in the url indicated in the graph explorer (and add your access_token to the end of the url).
Here is a good PHP tutorial on how to display a groups feed on a web page. It would be just as easy to display the posts from a page (since you are the admin)
Just replace the group ID with the page ID. Here is a link to the feed for the Facebook Platform feed graph api results. More info on FB Pages here.