8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【facebook php sdk】アクセストークンを2ヶ月にする

Posted at

アクセストークンを2ヶ月にする方法

  1. facebookのインスタンスを取得する
  2. アクセストークンを2ヶ月にする
  3. アクセストークンを取得する
ac_token.php
$config = array(
    'appId'  => APPID,
    'secret' => SECRET
);
$facebook = new Facebook($config);
$facebook->setExtendedAccessToken();
$longToken = $facebook->getAccessToken();

これでfacebookのアクセストークンの有効期限(通常は1~2時間)が2ヶ月間となる

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?