Plugin Directory

Changeset 1639715


Ignore:
Timestamp:
04/18/2017 10:42:40 AM (9 years ago)
Author:
ryo-nosuke
Message:

Update the api version

Location:
wp-facebook-portal/trunk
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • wp-facebook-portal/trunk

    • Property svn:ignore set to
      .git
      .gitignore
  • wp-facebook-portal/trunk/libraries/facebook.php

    r1035657 r1639715  
    3636 * @var string
    3737 */
    38     public $requestUrl = 'https://graph.facebook.com/v2.2';
     38    public $requestUrl = 'https://graph.facebook.com/v2.8';
    3939
    4040/**
     
    4343 * @var string
    4444 */
    45     public $postUrlFormat = 'https://www.facebook.com/%d/posts/%d';
     45    public $postUrlFormat = 'https://www.facebook.com/%s/posts/%s';
    4646
    4747/**
     
    143143    public function getAccessToken($config = array())
    144144    {
    145         if ($this->accessToken !== null) {
    146             return $this->accessToken;
    147         }
    148 
    149         if (!empty($config)) {
     145        if (empty($config)) {
     146            if ($this->accessToken !== null) {
     147                return $this->accessToken;
     148            }
     149        } else {
    150150            $this->setConfig($config);
    151151        }
     
    157157        );
    158158        if ($response = $this->apiRequest('/oauth/access_token', $params)) {
    159             parse_str($response, $result);
     159            if (is_array($response)) {
     160                $result = $response;
     161            } else {
     162                parse_str($response, $result);
     163            }
     164
    160165            if (!empty($result['access_token'])) {
    161166                $this->setAccessToken($result['access_token']);
     
    181186        );
    182187        $response = $this->apiRequest($path, $params);
    183         if (!empty($response['picture']['data']['url'])) {
    184             $response['picture'] = $response['picture']['data']['url'];
    185         }
    186         return $response;
     188        if (!empty($response['id'])) {
     189            if (!empty($response['picture']['data']['url'])) {
     190                $response['picture'] = $response['picture']['data']['url'];
     191            }
     192            return $response;
     193        }
     194        return false;
    187195    }
    188196
  • wp-facebook-portal/trunk/readme.txt

    r1035657 r1639715  
    44Tags: Facebook, Facebook page, portal, feed
    55Requires at least: 3.5.1
    6 Tested up to: 4.0.1
    7 Stable tag: 2.3.1
     6Tested up to: 4.7.3
     7Stable tag: 2.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3939アップデート情報や対応状況、機能追加予定なども配信しているのでぜひ『いいね!』を押してください。
    4040
    41 https://www.facebook.com/pages/WordPress-Plugins/563277537040790
     41https://www.facebook.com/rnsk.plugins/
    4242
    4343
     
    6666== Changelog ==
    6767
     682.3.2 
     69WordPress 4.7.3 に対応 
     70Facebook API v.2.8 に対応 
     71APIのバージョン変更に伴う修正
     72記事自動取得の不具合を修正 
     73記事リンクの不具合を修正 
     74
    68752.3.1 
    6976Facebook ページが投稿した記事のみ取得するよう修正 
     
    7279Modified to get only from Facebook page the posts. 
    7380Corresponded to the Facebook API v.2.2 
    74 Corresponded to the WordPress 4.0.1 
     81Corresponded to the WordPress 4.0.1
    7582
    76832.3 
     
    107114
    108115そのほかWordPressデフォルトの機能を優先して使うことで処理をスムーズに行うようにしました。
    109 
Note: See TracChangeset for help on using the changeset viewer.