PHP Classes

how can i publish a pin in pinterest in a specific table?

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  how can i publish a pin in pinterest...  >  (Un) Subscribe thread alerts  
Subject:how can i publish a pin in pinterest...
Summary:api with pinterest ?
Messages:4
Author:rafael de linares
Date:2020-02-19 16:47:38
 

  1. how can i publish a pin in pinterest...   Reply   Report abuse  
Picture of rafael de linares rafael de linares - 2020-02-19 16:47:38
regards. Is it possible to use this api to communicate directly with php.cli with my pinterest account and post pin on a board that I indicate?
Does anyone know any api as easy to use as TwitterAPIExchange for twitter but for Pinteres?
thanks

  2. Re: how can i publish a pin in pinterest...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2020-02-19 19:01:35 - In reply to message 1 from rafael de linares
Yes, it is possible. We do that in the PHP Classes site, not specifically with Pinterest nor Twitter, but others like for instance Google APIs. Since those are all based on OAuth, the principle is the same. Just follow these steps and let me know if you have difficulties:

1. Take a look at the script that comes with the class named file_login_with_google.php.

phpclasses.org/package/7700-PHP-Aut ...

You can create a version of this script to access Pinterest or Twitter API, named for instance file_login_with_pinterest.php

It calls a sub-class that comes with the package named file_oauth_client_class .

2. Use the file_login_with_pinterest.php script you created as as Web page to obtain the OAuth authorization token and store it in a file.

3. Create console based scripts that use the file_oauth_client_class just to make the API calls to Pinterest API that you need.

Name that script something like file_offline_access_to_pinterest.php .

It is similar to this other example script but this one uses MySQL to store API tokens instead of files.

phpclasses.org/package/7700-PHP-Aut ...

4. Then just make any API calls that you need to call Pinterest API using the class CallAPI function.

Was this clear?

  3. Re: how can i publish a pin in pinterest...   Reply   Report abuse  
Picture of rafael de linares rafael de linares - 2020-02-20 17:53:47 - In reply to message 2 from Manuel Lemos

345/5000
Thank you for your quick response, I will try to do what you say. In any case, I tried to follow some kind of guide on how to do it, as with the access to the tweet api that I found very easy to implement. If you knew of any library to post so much on instagram, facebook and pinterest I would appreciate it. Thanks again.

  4. Re: how can i publish a pin in pinterest...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2020-02-21 05:18:28 - In reply to message 3 from rafael de linares
Well, using other social networks' APIs is very similar as the OAuth process is the same and this class is aware of how to deal with those APIs.

What is different is the URLs and parameters of the API calls of those other social networks that you may want to use. For that you need to check the documentation of those APIs.

If you have doubts, just reply here.