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}
Related
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?
I am trying to receive an event from the Facebook Graph Api By Id with following request:
https://graph.facebook.com/{eventid}?access_token={app_accesstoken}
I am using an app-accesstoken. The Event is a public event and according to the Graph Api docs I should be able to receive public events with any access token: https://developers.facebook.com/docs/graph-api/reference/event/
Nevertheless I receive following error-response:
Unsupported get request. Object with ID '{eventid}' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
I have tried with multiple events with the same results
In April 2018, following the Cambridge Analytics scandal, Facebook decided to greatly reduce the information available through Facebook API.
In particular regarding Events API, here the official statement.
Events API: Until today, people could grant an app permission to get information about events they host or attend, including private
events. This made it easy to add Facebook Events to calendar,
ticketing or other apps. But Facebook Events have information about
other people’s attendance as well as posts on the event wall, so it’s
important that we ensure apps use their access appropriately. Starting
today, apps using the API will no longer be able to access the guest
list or posts on the event wall. And in the future, only apps we
approve that agree to strict requirements will be allowed to use the
Events API.
After that change you will not be able to get events of Facebook Pages, using the Facebook API like in the old days.
You could be able to get the data of a page you own if you have user_event permission (https://developers.facebook.com/docs/graph-api/reference/user/events/) but your app need to pass the App Review process.
Source: https://newsroom.fb.com/news/2018/04/restricting-data-access/
I set up a Facebook Webhook to notify my app of changes to my business page. Then I did the same with the Messenger platform. Then when I started posting as a user of my page, and sending messages, I found out that the user IDs are different across different pages and apps.
So, facebook provides two endpoints: ids_for_apps, and ids_for_pages. There are quite a few "but"s to use these endpoints, but at least in development mode, and for IDs sent by the Messenger webhook, it works. I get the notification and I'm able too look up the IDs and match to an app id (because maybe the user commented on a photo before contacting me via Messenger)
Now if I try to do the same with a sender_id that I got from the Facebook Webhooks, "feed" subscription, I get the "singular links API is deprecated for versions v2.4 and higher"
The url I try to access, even with Graph API Explorer tool is GET /2.9/{sender_id}/ids_for_apps
What's going on here?
My question is,
if I am the user using an authorized web application, can I post something to my friends' timeline at once, and without any interactions with me?
I've read this topic and other relative posts on stackoverflow, and I understand that facebook had made some changes.
But when I read Feed Dialog document, I find out that it said:
Your application can also publish directly to a profile's timeline without interaction on the part of someone using your app. To accomplish this, use the corresponding Graph API call
while "Graph API call" is an unavailable link. And I can't figure out what the corresponding graph api call is.
You cannot Post to User's Friends timelines through the Graph API, as simple as that. You can only Post to the authorized User's wall through the Graph API.
The only way to achieve the similar functionality, as the blog post that you have checked suggests is,
If you want to allow people to post to their friend’s timeline from your app, you can invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag).
I have a merchandising web site that allows user to buy stuff on my web site. I want to integrate this feature with facebook and enable users to allow my site to post on their wall a message showing that they have purchased an item from my web site.
How should I got about doing this. Do I need to create a facebook app to do this? Basically, I just want to enable users to accept my request to post a custom message on their walls.
You will have to implement the Facebook Connect in your site so that users are able to login and you need this to publish stream to their walls.
See this tutorial on how to implement facebook connect
Before you publish streams to their wall, you will have to ask them for publish_steam and offline_access extended permissions.
See this tutorial on how to get permissions
To actually post streams to their wall, have a look at stream.publish method.