I want to get custom labels in page conversation via facebook graph api.
I found out from here.
https://developers.facebook.com/docs/graph-api/reference/v2.11/conversation
But I can not find.
I want to know, Can facebook graph api get custom label in page conversation?
Unfortunately Facebook only gives you labels applied to a user. So first you need the conversation participants and their user-ids, then you can get the labels associated with that user.
To get all the custom labels on a page
GET /v2.12/{page-id}/custom_labels (source)
Get the paticipants
GET /v2.12/{page-id}/conversations?fields=participants
(source)
You'll have to find which conversation you are looking for
or if you have the conversation id: GET /v2.12/{thread-id}?fields=participants
Get the labels
The participant id is the user-id. You can use the user-id to get the labels here:
GET /v2.12/{user-id}/custom_labels
(source)
Related
Are there any Facebook APIs to retrieve the episodes of a show from Facebook Watch?
E.G. Get all the series and episodes in those series of https://www.facebook.com/sacredliesshow/
The closest I can find is https://developers.facebook.com/docs/graph-api/reference/video-list/#Reading but it's not clear how I should deduce the {video-list-id} from the page https://www.facebook.com/sacredliesshow/
Thanks
You should be able to get all video lists (including their IDs and names) for a page (based on ID) from here: https://developers.facebook.com/docs/graph-api/reference/page/video_lists/
That specific page's ID seems to be "454309158359123" (Extracted from the page's header section). However, given that the endpoint mentioned above is private I don't think you'll be able to use this if you don't actually own the page or have login access to it. Probably also why you can't just get the ID of video lists from their website by inspecting the source.
I am trying to automate Post and Shares in Facebook Page's feed using the Graph API.
For simple posts in feed like text and link I was able to do it with no struggle.
(Based in this: https://developers.facebook.com/docs/graph-api/reference/v2.10/user/feed#publish)
Then I got into making a Share of photo or video. Again not a problem. But I have noticed in Facebook Page itself it is possible to add a Send Message button. Where it even has a label with "Add this button to your post so people can reply directly in Messenger."
Facebook create post in Page
I was looking in the actions sections and other places and I found no way to add it via Graph request.
Currently, I am generating the Post via Graph like this:
POST graph.facebook.com/v2.10/MY_PAGE_ID/photos?access_token=PAGE_TOKEN&caption=MY_TEXT&url=IMAGE_URL
It it possible to add the Send Message button via Graph? Or this is only restricted to Facebook UI?
Thanks for the help!
Use this endpoint /page-id/feed https://developers.facebook.com/docs/graph-api/reference/v3.0/post
call_to_action parameter should be
{"type":"MESSAGE_PAGE","value":{}}
I am using facebook4j to add fb page feed posting capabilities to an existing system. Initially I thought it would just be for posting to pages, which is done, but many pages don't allow posting. In such a case I need to fall back to targeting the individual in a status message. In facebook such a post shows up with heading like "{User's Name} > {Target's Name}".
The problem I'm running into is that even though the facebook graph api has a "to" attribute for a message, I can not find a way to accomplish this with facebook4j. The postStatusMessage() method appears to only accept the id of the feed to post to and the PostUpdate class does not have a "to" property. I could of course be misunderstanding what the arguments represent or how this should be accomplished.
Any suggestions would be appreciated.
The problem is to get the link to menu from a Facebook official page of a restaurant.
Here is an example of such page: https://www.facebook.com/freshchoice.bb — there is a link to menu of the restaurant which leads to https://www.facebook.com/download/216155385221332/Facebook%20menu.pdf.
Actually, this link works well even if I remove the name of the file from it, and I understand, that 216155385221332 is an ID of some object. But how can I obtain this ID from the API?
I have already spent two days trying to find a solution for this task and have had no luck.
When I request data from Facebook Graph API, I get tons of information, and I can request any of the fields listed here: https://developers.facebook.com/docs/graph-api/reference/page but there is no 'menu', or 'downloads' field, and I have almost broke my brain trying to find out a way to solve this puzzle.
I don't think there's a way to reach this object if you didn't create it yourself.
There's the restaurant.menu OpenGraph object:
https://developers.facebook.com/docs/reference/opengraph/object-type/restaurant.menu/
but I think only the user who created it can access it programatically.
The page you're referring to probably just uploaded the menu via the Facebook website, and didn't create an OpenGraph object.
Se
https://www.facebook.com/help/533179700126832
I am able to login, get the user profile data, and even pull photos from a public page's photo library. The issue is when I try to access the page's events list using:
graph.facebook.com/PAGE_ID/events
all that is returned is a blank array.
On http://www.facebook.com/BeerLovesSouthside/events you can see a full list of events. Even using the graph explorer tool I am not getting any errors about access tokens or anything.
On http://www.facebook.com/BeerLovesSouthside/events you can see a full list of events.
That’s events created by that page.
https://developers.facebook.com/docs/reference/api/page/#connections says,
events: The events the Page is attending.
So I guess if you want the events created by the page, you have to read the corresponding posts from their feed by type.