【问题标题】:Unable to get access token from instagram无法从 instagram 获取访问令牌
【发布时间】:2015-11-22 05:24:40
【问题描述】:

我将这个instagram wrapper package 用于laravel 5.1。我试图通过 API 连接到 instagram,然后验证用户使用

use Vinkla\Instagram\Facades\Instagram;
public function instagramlogin(Request $request)
{
    // Get code parameter.
    $code = $request->get('code');

    // Request the access token.
    $data = Instagram::getOAuthToken($code);

    // Set the access token with $data object.
    Instagram::setAccessToken($data);

    // We're done here - how easy was that, it just works!
    Instagram::getUserLikes();
    // This example is simple, and there are far more methods available.
}

然后能够访问他/她的个人资料数据。但我不断收到错误说明

ErrorException in Instagram.php line 526:
Undefined property: stdClass::$access_token

如何对用户进行身份验证?

【问题讨论】:

    标签: php oauth-2.0 instagram laravel-5.1 instagram-api


    【解决方案1】:

    我解决了这个问题。你基本上必须使用cosenary instagram package,因为这个包是那个包的包装器。因此,如果您浏览 cosenary 包上的文档并改用外观,则这些功能将起作用。

    【讨论】:

      猜你喜欢
      • 2016-02-02
      • 2016-10-22
      • 2015-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多