KyleAMathews / facebook-export

Tools to help administer your Facebook groups
MIT License
104 stars 29 forks source link

Sale post API #19

Open montanaday opened 8 years ago

montanaday commented 8 years ago

Facebook groups have a specific feature - Sale Post that allows to post items for sale. What about filtering returned items so we only get for sale posts or even how to check if the post is a for sale post or not in a Group? Thanks

KyleAMathews commented 8 years ago

Happy to take a PR that adds exporting sale posts (if they're not already exported) but not interested in adding support for filtering. You can get a JSON version of your posts which is easy enough to filter.

montanaday commented 8 years ago

Yes, the sale posts are exported but along with all other posts in a group. What I mean is to add an API call to check if the posts are sale posts and then export them accordingly to JSON using your script.. .

KyleAMathews commented 7 years ago

If it's a non-disruptive change, happy to merge a PR!

montanaday commented 7 years ago

As I can see, a sale post is almost identical to a standard post (except for the embedded price and location info), so there is not much for identifying a sale post on Facebook API.

` [

{
    "from": {
        "name": "FB group user name",
        "id": "xxxxxxxxxxxxxxxxx"
    },
    "message": "Sale Item Header Text Here\n€50 - Berlin, Germany\n\nDetailed Item Description Text.",
    "picture": "https://scontent.xx.fbcdn.net/v/t1.0-0/......",
    "link": "https://www.facebook.com/photo.php.....",
    "created_time": "2016-09-19T15:38:34+0000",
    "updated_time": "2016-09-19T15:38:35+0000",
    "id": "xxxxxxxxxxxxxxxxx",
    "to": {
        "data": [
            {
                "id": "xxxxxxxxxxx",
                "name": "Item Name"
            }
        ]
    }
}

] `

itpao25 commented 7 years ago

is there any news? I'm trying to get the information on sale posts

andygomezb7 commented 6 years ago

You can only know why in the permalink url comes out sale_post_id but nothing else.

ShaneRich5 commented 6 years ago

Is there a better way besides checking the permalink and parsing it yourself?