How to post pictures from a site in popular social networks? Are there any ready-made libraries that implement posting in vkontakte, facebook, twitter, odnoklassniki, etc.?

1 answer 1

In short, each social network has its own API that allows you to interact with it.

Each API has its own features and no universal tool. You can try to write your own wrapper for each of these APIs, you can use those already written by other developers (see GitHub ).

If I needed to use several social networks in my application, I would implement a single class-interface of the general interaction with the social. networks, and already in it used classes implementers of each necessary API. With this approach, for the whole application you only have the socialSharer.postPicture() method and already in this postPicture() you already implement your mechanisms. Thus, your application has no idea how and in what social. chats you post pictures, plus you can connect as many social network implementations as you work with them in one place.