Greetings, esteemed public! Here's Yellow, and today we're going to take a look at adding comments to our promotional posts.
I'm a bit surprised that the arbitration community, which is actively interested in the possibilities of Facebook API, still does not have a suitable recruiting software, although the idea seems to be on the surface. Hopefully, after this article is published, these tools will appear on the market.
So, I responsibly declare that by the end of this reading, you will have a simple way to get the hang of it, with which you can immediately get down to business!
What we'll need:
- Several autoregs, with uploaded avatar and with a name for the desired GEO (in the CIS - with Russian, the burg with names in Latin)
- Access Tokens from each of these autoregs
- The post ID of your ad
- Identifier of the fp where the post is posted
- The CURL program with which we will send requests
- Comment texts
If with the first two points everything is clear, then with the rest let's deal in detail.
Getting the post identifier of the commitment
Inside fb, every ad "belongs" to the fp from which you spin it. That is, it is essentially a post on the ffp. To get the post ID, go to Page Posts in the menu, select your ad and see:
At the same time, right there you can get the fp identifier: move your mouse to ... in the upper right corner and see a link at the bottom that says context_id=1111111 this will be the id of our fp.
Publish a comment using CURL
We have almost everything ready to publish our first comment. To send requests to the API we will use the console program CURL. On mac it's built-in by default, so we just run Terminal. And for Windows download CURL from here and unzip the archive into any folder, then run the console (Start-Run-cmd-Enter) and navigate to this folder (cd Full_Way_to_Folder).
Let's go! Copy the request below into a notepad somewhere and fill it with all the necessary data: fp id, post id, token, comment. Then copy the completed template into the console and press Enter.
curl -X POST "https://graph.facebook.com/v6.0/fpId_postId/comments?access_token=token" -H "Content-Type: application/x-www-form-urlencoded" -d "message=Thank you"
If successful, you will see in the console a response from fb, in which the id of your new published comment will be written:
You will also see this comment right on the Page Posts page:
All you have to do is fill in one by one and type a command for each of your autoregs into the console and get the number of comments you want. ?
I hope it was helpful! If you enjoyed this article, don't forget to throw in donateThe project exists only because of them. And, of course, pour into the plus, my ass!
P.S. In the screenshots. my stepfather's paintings, he is a professional painterIf you need a chic gift, or you want to decorate the interior of your home/apartment - write to the LS, this is the top!