如何获取访问令牌以访问 Pinterest Api [英] How to get access token for access Pinterest Api

查看:35
本文介绍了如何获取访问令牌以访问 Pinterest Api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 stackoverflow 上用谷歌搜索过,但没有找到答案.

I have Googled and searched on stackoverflow but could not find the answer.

我正在编写一个应用程序,这需要访问 Pinterest API.这是我的 github 仓库:https://github.com/kellan/pinterest.api.php

I am writing an app, and this needs access to the Pinterest API. This is my github repo: https://github.com/kellan/pinterest.api.php

$p = new Pinterest_API();
$p->fetch_access_token($client_id, $client_secret, $username, $password);
$resp = $p->some_api_call($args);

但我不知道在哪里可以找到 $client_id 和 $client_secret?

But i dont know where to find $client_id and $client_secret?

推荐答案

去这里,点击Generate,并获得一个访问令牌:https://developers.pinterest.com/tools/access_token/

示例:使用以下方法获取状态:https://api.pinterest.com/v1/me/pins/?access_token=TOKEN&fields=id,creator,note&limit=2

Example: get statuses using: https://api.pinterest.com/v1/me/pins/?access_token=TOKEN&fields=id,creator,note&limit=2

有关额外参数和请求,请参阅文档:https://developers.pinterest.com/docs/api/概览/

See docs for extra parameters and requests: https://developers.pinterest.com/docs/api/overview/

这篇关于如何获取访问令牌以访问 Pinterest Api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆