skip to Main Content

I have looked all over the internet and have not found an answer.

I admin a buy and sell group on facebook and am querying the group/feed through the facebook graph api. If I post in the group as a ‘discussion’ post it shows up in the query results, but anything I post as a ‘buy/sell’ post does not come through in the query results. Is there anything in the graph API for querying buy/sell posts in a group?

3

Answers


  1. I have same problem now. Before query with field ‘feed’ gave me all type of post from group, but now only discussion appear in response. Did you use ‘posts’ field?

    Login or Signup to reply.
  2. This is still a problem as of April 2020. Posts to a group which have a sale_post_id in the query string on their detail page come back from the /feed endpoint without any content, only an id and an updated_time parameter.

    No documentation referencing Sales Posts appears to exist in the Group Feed graph API documentation.

    As far as I can tell, there is no present solution for programmatic access to these post types.

    Login or Signup to reply.
  3. It looks like you need to include the field "attachments" to get the item for sale. In the following example, 6161166157241517_6161180003906799 is a post to a group containing a item for sale, "Gears".

    I’m not sure how long the link will be valid for, but here’s the UI link to that post: https://www.facebook.com/commerce/listing/1114583039178806/?ref=share_attachment

    Making a GET request to this endpoint: https://graph.facebook.com/6161166157241517_6161180003906799?fields=child_attachments,attachments,status_type,type

    Yields this response JSON (note that child_attachments and status_type are not included in the output)

    {
      "attachments": {
        "data": [
          {
            "description": "$500",
            "media": {
              "image": {
                "height": 541,
                "src": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.30808-6/325734407_702872891457106_7651211745488246974_n.jpg?stp=dst-jpg_s720x720&_nc_cat=105&ccb=1-7&_nc_sid=5bac3a&_nc_ohc=jYk_Nog1WEkAX_b9Q4z&_nc_ht=scontent-ord5-1.xx&edm=ADqbNqUEAAAA&oh=00_AfD3HFpQ-qLlq8Ru5FYAgn7L21aPnAe6NpvXdLd5rRIO0Q&oe=63C82336",
                "width": 720
              }
            },
            "subattachments": {
              "data": [
                {
                  "media": {
                    "image": {
                      "height": 541,
                      "src": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.30808-6/325734407_702872891457106_7651211745488246974_n.jpg?stp=dst-jpg_s720x720&_nc_cat=105&ccb=1-7&_nc_sid=5bac3a&_nc_ohc=jYk_Nog1WEkAX_b9Q4z&_nc_ht=scontent-ord5-1.xx&edm=ADqbNqUEAAAA&oh=00_AfD3HFpQ-qLlq8Ru5FYAgn7L21aPnAe6NpvXdLd5rRIO0Q&oe=63C82336",
                      "width": 720
                    }
                  },
                  "target": {
                    "id": "153887997464544",
                    "url": "https://www.facebook.com/photo.php?fbid=153887997464544&set=gm.6161180003906799&type=3"
                  },
                  "type": "photo",
                  "url": "https://www.facebook.com/photo.php?fbid=153887997464544&set=gm.6161180003906799&type=3"
                }
              ]
            },
            "target": {
              "id": "1114583039178806",
              "url": "https://www.facebook.com/groups/6161166157241517/permalink/6161180003906799/?sale_post_id=6161180003906799"
            },
            "title": "Gears",
            "type": "native_templates",
            "url": "https://www.facebook.com/groups/6161166157241517/permalink/6161180003906799/?sale_post_id=6161180003906799"
          }
        ]
      },
      "type": "status",
      "id": "6161166157241517_6161180003906799"
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search